function ConnectionTest::providerDeprecatedFetchModes

Provides data for testDeprecatedFetchModes.

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 952

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public static function providerDeprecatedFetchModes() : array {
    return [
        'FETCH_DEFAULT' => [
            \PDO::FETCH_DEFAULT,
        ],
        'FETCH_LAZY' => [
            \PDO::FETCH_LAZY,
        ],
        'FETCH_BOTH' => [
            \PDO::FETCH_BOTH,
        ],
        'FETCH_BOUND' => [
            \PDO::FETCH_BOUND,
        ],
        'FETCH_INTO' => [
            \PDO::FETCH_INTO,
        ],
        'FETCH_FUNC' => [
            \PDO::FETCH_FUNC,
        ],
        'FETCH_NAMED' => [
            \PDO::FETCH_NAMED,
        ],
        'FETCH_KEY_PAIR' => [
            \PDO::FETCH_KEY_PAIR,
        ],
        'FETCH_CLASS | FETCH_CLASSTYPE' => [
            \PDO::FETCH_CLASS | \PDO::FETCH_CLASSTYPE,
        ],
    ];
}

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