protected function ContextMapperTest::setUp in Page Manager 8
Same name and namespace in other branches
- 8.4 tests/src/Unit/ContextMapperTest.php \Drupal\Tests\page_manager\Unit\ContextMapperTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ ContextMapperTest.php, line 48 - Contains \Drupal\Tests\page_manager\Unit\ContextMapperTest.
Class
- ContextMapperTest
- @coversDefaultClass \Drupal\page_manager\ContextMapper
Namespace
Drupal\Tests\page_manager\UnitCode
protected function setUp() {
parent::setUp();
$this->typedDataManager = $this
->prophesize(TypedDataManager::class);
$this->entityRepository = $this
->prophesize(EntityRepositoryInterface::class);
$this->staticContext = new ContextMapper($this->entityRepository
->reveal());
$container = new ContainerBuilder();
$container
->set('typed_data_manager', $this->typedDataManager
->reveal());
\Drupal::setContainer($container);
}