function SqlContentEntityStorageTest::setUpEntityStorage
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::setUpEntityStorage()
- 10 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::setUpEntityStorage()
- 11.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::setUpEntityStorage()
Sets up the content entity database storage.
19 calls to SqlContentEntityStorageTest::setUpEntityStorage()
- SqlContentEntityStorageTest::testCleanIds in core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php - Tests entity ID sanitization.
- SqlContentEntityStorageTest::testCreate in core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php - @covers ::create
- SqlContentEntityStorageTest::testGetBaseTable in core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php - Tests SqlContentEntityStorage::getBaseTable().
- SqlContentEntityStorageTest::testGetDataTable in core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php - Tests SqlContentEntityStorage::getDataTable().
- SqlContentEntityStorageTest::testGetRevisionDataTable in core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php - Tests SqlContentEntityStorage::getRevisionDataTable().
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php, line 1156
Class
- SqlContentEntityStorageTest
- @coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorage @group Entity
Namespace
Drupal\Tests\Core\Entity\SqlCode
protected function setUpEntityStorage() {
$this->connection = $this->getMockBuilder('Drupal\\Core\\Database\\Connection')
->disableOriginalConstructor()
->getMock();
$this->entityTypeManager
->expects($this->any())
->method('getDefinition')
->willReturn($this->entityType);
$this->entityTypeManager
->expects($this->any())
->method('getActiveDefinition')
->willReturn($this->entityType);
$this->entityFieldManager
->expects($this->any())
->method('getFieldStorageDefinitions')
->willReturn($this->fieldDefinitions);
$this->entityFieldManager
->expects($this->any())
->method('getActiveFieldStorageDefinitions')
->willReturn($this->fieldDefinitions);
$this->entityStorage = new SqlContentEntityStorage($this->entityType, $this->connection, $this->entityFieldManager, $this->cache, $this->languageManager, new MemoryCache(), $this->entityTypeBundleInfo, $this->entityTypeManager);
$this->entityStorage
->setModuleHandler($this->moduleHandler);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.