protected function RdfMappingConfigEntityUnitTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rdf/tests/src/Unit/RdfMappingConfigEntityUnitTest.php \Drupal\Tests\rdf\Unit\RdfMappingConfigEntityUnitTest::setUp()
- 9 core/modules/rdf/tests/src/Unit/RdfMappingConfigEntityUnitTest.php \Drupal\Tests\rdf\Unit\RdfMappingConfigEntityUnitTest::setUp()
File
- core/
modules/ rdf/ tests/ src/ Unit/ RdfMappingConfigEntityUnitTest.php, line 47
Class
- RdfMappingConfigEntityUnitTest
- @coversDefaultClass \Drupal\rdf\Entity\RdfMapping @group rdf
Namespace
Drupal\Tests\rdf\UnitCode
protected function setUp() : void {
$this->entityTypeId = $this
->randomMachineName();
$this->entityType = $this
->createMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
$this->entityType
->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);
}