You are here

protected function VariantRouteFilterTest::setUp in Page Manager 8.4

Same name and namespace in other branches
  1. 8 tests/src/Unit/VariantRouteFilterTest.php \Drupal\Tests\page_manager\Unit\VariantRouteFilterTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/VariantRouteFilterTest.php, line 62

Class

VariantRouteFilterTest
@coversDefaultClass \Drupal\page_manager\Routing\VariantRouteFilter @group PageManager

Namespace

Drupal\Tests\page_manager\Unit

Code

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);
}