function SqlContentEntityStorageTest::testGetRevisionTable
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetRevisionTable()
- 10 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetRevisionTable()
- 11.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetRevisionTable()
Tests SqlContentEntityStorage::getRevisionTable().
@covers ::__construct @covers ::getRevisionTable
@dataProvider providerTestGetRevisionTable
Parameters
string $revision_table: The revision table to be returned by the mocked entity type.
string $expected: The expected return value of SqlContentEntityStorage::getRevisionTable().
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php, line 199
Class
- SqlContentEntityStorageTest
- @coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorage @group Entity
Namespace
Drupal\Tests\Core\Entity\SqlCode
public function testGetRevisionTable($revision_table, $expected) {
$this->entityType
->expects($this->any())
->method('isRevisionable')
->will($this->returnValue(TRUE));
$this->entityType
->expects($this->once())
->method('getRevisionTable')
->will($this->returnValue($revision_table));
$this->entityType
->expects($this->any())
->method('getRevisionMetadataKeys')
->willReturn([]);
$this->setUpEntityStorage();
$this->assertSame($expected, $this->entityStorage
->getRevisionTable());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.