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