protected function SqlContentEntityStorageTest::setUpEntityStorage in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::setUpEntityStorage()
Sets up the content entity database storage.
20 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::testGetFieldStorageDefinitions in core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php - @covers ::getFieldStorageDefinitions
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ SqlContentEntityStorageTest.php, line 1159 - 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);
}