protected function PageContextTestBase::setUp in Page Manager 8.4
Same name and namespace in other branches
- 8 tests/src/Unit/PageContextTestBase.php \Drupal\Tests\page_manager\Unit\PageContextTestBase::setUp()
Overrides UnitTestCase::setUp
1 call to PageContextTestBase::setUp()
- LanguageInterfaceContextTest::setUp in tests/
src/ Unit/ LanguageInterfaceContextTest.php
1 method overrides PageContextTestBase::setUp()
- LanguageInterfaceContextTest::setUp in tests/
src/ Unit/ LanguageInterfaceContextTest.php
File
- tests/
src/ Unit/ PageContextTestBase.php, line 40
Class
- PageContextTestBase
- Provides a base class for testing page context classes.
Namespace
Drupal\Tests\page_manager\UnitCode
protected function setUp() {
parent::setUp();
$this->typedDataManager = $this
->prophesize(TypedDataManager::class);
$container = new ContainerBuilder();
$container
->set('string_translation', $this
->getStringTranslationStub());
$container
->set('typed_data_manager', $this->typedDataManager
->reveal());
\Drupal::setContainer($container);
$this->page = $this
->prophesize(PageInterface::class);
$this->event = new PageManagerContextEvent($this->page
->reveal());
}