You are here

public function SqlContentEntityStorageTest::testGetTableMappingEmpty in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 373
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(array(
    'entity_test',
  ), $mapping
    ->getTableNames());
  $this
    ->assertSame(array(), $mapping
    ->getFieldNames('entity_test'));
  $this
    ->assertSame(array(), $mapping
    ->getExtraColumns('entity_test'));
}