function ConnectionTest::providerSupportedFetchModes

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

Provides data for testSupportedFetchModes.

Return value

array<string,array<\Drupal\Core\Database\Statement\FetchAs>> The FetchAs cases.

File

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

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public static function providerSupportedFetchModes() : array {
  return [
    'Associative array' => [
      FetchAs::Associative,
    ],
    'Classed object' => [
      FetchAs::ClassObject,
    ],
    'Single column' => [
      FetchAs::Column,
    ],
    'Simple array' => [
      FetchAs::List,
    ],
    'Standard object' => [
      FetchAs::Object,
    ],
  ];
}

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