protected function SqlContentEntityStorageTest::setUpEntityStorage in Drupal 9
Same name and namespace in other branches
- 8 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 1157 - Contains \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest.
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')
->will($this
->returnValue($this->entityType));
$this->entityTypeManager
->expects($this
->any())
->method('getActiveDefinition')
->will($this
->returnValue($this->entityType));
$this->entityFieldManager
->expects($this
->any())
->method('getFieldStorageDefinitions')
->will($this
->returnValue($this->fieldDefinitions));
$this->entityFieldManager
->expects($this
->any())
->method('getActiveFieldStorageDefinitions')
->will($this
->returnValue($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);
}