protected function VariantRouteFilterTest::setUp in Page Manager 8
Same name and namespace in other branches
- 8.4 tests/src/Unit/VariantRouteFilterTest.php \Drupal\Tests\page_manager\Unit\VariantRouteFilterTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ VariantRouteFilterTest.php, line 67 - Contains \Drupal\Tests\page_manager\Unit\VariantRouteFilterTest.
Class
- VariantRouteFilterTest
- @coversDefaultClass \Drupal\page_manager\Routing\VariantRouteFilter @group PageManager
Namespace
Drupal\Tests\page_manager\UnitCode
protected function setUp() {
$this->pageVariantStorage = $this
->prophesize(ConfigEntityStorageInterface::class);
$this->entityTypeManager = $this
->prophesize(EntityTypeManagerInterface::class);
$this->entityTypeManager
->getStorage('page_variant')
->willReturn($this->pageVariantStorage);
$this->currentPath = $this
->prophesize(CurrentPathStack::class);
$this->requestStack = new RequestStack();
$this->routeFilter = new VariantRouteFilter($this->entityTypeManager
->reveal(), $this->currentPath
->reveal(), $this->requestStack);
}