protected function EntityDisplayModeBaseUnitTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayModeBaseUnitTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ EntityDisplayModeBaseUnitTest.php, line 57 - Contains \Drupal\Tests\Core\Config\Entity\EntityDisplayModeBaseUnitTest.
Class
- EntityDisplayModeBaseUnitTest
- @coversDefaultClass \Drupal\Core\Entity\EntityDisplayModeBase @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
protected function setUp() {
$this->entityType = $this
->randomMachineName();
$this->entityInfo = $this
->getMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
$this->entityInfo
->expects($this
->any())
->method('getProvider')
->will($this
->returnValue('entity'));
$this->entityManager = $this
->getMock('\\Drupal\\Core\\Entity\\EntityManagerInterface');
$this->uuid = $this
->getMock('\\Drupal\\Component\\Uuid\\UuidInterface');
$container = new ContainerBuilder();
$container
->set('entity.manager', $this->entityManager);
$container
->set('uuid', $this->uuid);
\Drupal::setContainer($container);
}