You are here

public function SqlContentEntityStorageTest::testGetDataTable 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::testGetDataTable()

Tests SqlContentEntityStorage::getDataTable().

@covers ::__construct @covers ::getDataTable

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php, line 240
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 testGetDataTable() {
  $this->entityType
    ->expects($this
    ->any())
    ->method('isTranslatable')
    ->will($this
    ->returnValue(TRUE));
  $this->entityType
    ->expects($this
    ->exactly(1))
    ->method('getDataTable')
    ->will($this
    ->returnValue('entity_test_field_data'));
  $this->entityType
    ->expects($this
    ->any())
    ->method('getRevisionMetadataKeys')
    ->willReturn([]);
  $this
    ->setUpEntityStorage();
  $this
    ->assertSame('entity_test_field_data', $this->entityStorage
    ->getDataTable());
}