protected function EntityDisplayModeBaseUnitTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayModeBaseUnitTest::setUp()
- 9 core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\EntityDisplayModeBaseUnitTest::setUp()
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ EntityDisplayModeBaseUnitTest.php, line 53
Class
- EntityDisplayModeBaseUnitTest
- @coversDefaultClass \Drupal\Core\Entity\EntityDisplayModeBase @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
protected function setUp() : void {
$this->entityType = $this
->randomMachineName();
$this->entityInfo = $this
->createMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
$this->entityInfo
->expects($this
->any())
->method('getProvider')
->will($this
->returnValue('entity'));
$this->entityTypeManager = $this
->createMock(EntityTypeManagerInterface::class);
$this->uuid = $this
->createMock('\\Drupal\\Component\\Uuid\\UuidInterface');
$container = new ContainerBuilder();
$container
->set('entity_type.manager', $this->entityTypeManager);
$container
->set('uuid', $this->uuid);
\Drupal::setContainer($container);
}