function ConnectionTest::providerSupportedFetchModes

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerSupportedFetchModes()

Provides data for testSupportedFetchModes.

Return value

array An associative array of simple arrays, each having the following elements:

  • a PDO fetch mode.

File

core/tests/Drupal/Tests/Core/Database/ConnectionTest.php, line 893

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public static function providerSupportedFetchModes() : array {
    return [
        'FETCH_ASSOC' => [
            \PDO::FETCH_ASSOC,
        ],
        'FETCH_CLASS' => [
            \PDO::FETCH_CLASS,
        ],
        'FETCH_CLASS | FETCH_PROPS_LATE' => [
            \PDO::FETCH_CLASS | \PDO::FETCH_PROPS_LATE,
        ],
        'FETCH_COLUMN' => [
            \PDO::FETCH_COLUMN,
        ],
        'FETCH_NUM' => [
            \PDO::FETCH_NUM,
        ],
        'FETCH_OBJ' => [
            \PDO::FETCH_OBJ,
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.