function ContextMapperTest::setUp
Same name in other branches
- 8.x-3.x tests/src/Unit/ContextMapperTest.php \Drupal\Tests\ctools\Unit\ContextMapperTest::setUp()
Overrides UnitTestCase::setUp
File
-
tests/
src/ Unit/ ContextMapperTest.php, line 46
Class
- ContextMapperTest
- @coversDefaultClass \Drupal\ctools\ContextMapper
Namespace
Drupal\Tests\ctools\UnitCode
protected function setUp() : void {
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);
}