function SqlContentEntityStorageTest::testGetDataTable

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetDataTable()
  2. 10 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetDataTable()
  3. 11.x 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 239

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')
        ->willReturn(TRUE);
    $this->entityType
        ->expects($this->exactly(1))
        ->method('getDataTable')
        ->willReturn('entity_test_field_data');
    $this->entityType
        ->expects($this->any())
        ->method('getRevisionMetadataKeys')
        ->willReturn([]);
    $this->setUpEntityStorage();
    $this->assertSame('entity_test_field_data', $this->entityStorage
        ->getDataTable());
}

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