function SqlContentEntityStorageTest::providerTestGetBaseTable

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::providerTestGetBaseTable()
  2. 8.9.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::providerTestGetBaseTable()
  3. 11.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::providerTestGetBaseTable()

Provides test data for testGetBaseTable().

Return value

array[] A nested array where each inner array has the base table to be returned by the mocked entity type as the first value and the expected return value of SqlContentEntityStorage::getBaseTable() as the second value.

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php, line 177

Class

SqlContentEntityStorageTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorage[[api-linebreak]] @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public static function providerTestGetBaseTable() {
  return [
    // Test that the entity type's base table is used, if provided.
[
      'entity_test',
      'entity_test',
    ],
    // Test that the storage falls back to the entity type ID.
[
      NULL,
      'entity_test',
    ],
  ];
}

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