You are here

public function SqlContentEntityStorageTest::testGetTableMappingEmpty in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetTableMappingEmpty()

Tests getTableMapping() with an empty entity type.

@covers ::__construct @covers ::getTableMapping

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php, line 458
Contains \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest.

Class

SqlContentEntityStorageTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorage @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public function testGetTableMappingEmpty() {
  $this
    ->setUpEntityStorage();
  $mapping = $this->entityStorage
    ->getTableMapping();
  $this
    ->assertSame([
    'entity_test',
  ], $mapping
    ->getTableNames());
  $this
    ->assertSame([], $mapping
    ->getFieldNames('entity_test'));
  $this
    ->assertSame([], $mapping
    ->getExtraColumns('entity_test'));
}