public function VariantRouteFilterTest::testFilterEmptyCollection in Page Manager 8
Same name and namespace in other branches
- 8.4 tests/src/Unit/VariantRouteFilterTest.php \Drupal\Tests\page_manager\Unit\VariantRouteFilterTest::testFilterEmptyCollection()
@covers ::filter
File
- tests/
src/ Unit/ VariantRouteFilterTest.php, line 91 - Contains \Drupal\Tests\page_manager\Unit\VariantRouteFilterTest.
Class
- VariantRouteFilterTest
- @coversDefaultClass \Drupal\page_manager\Routing\VariantRouteFilter @group PageManager
Namespace
Drupal\Tests\page_manager\UnitCode
public function testFilterEmptyCollection() {
$route_collection = new RouteCollection();
$request = new Request();
$this->currentPath
->getPath($request)
->shouldNotBeCalled();
$result = $this->routeFilter
->filter($route_collection, $request);
$expected = [];
$this
->assertSame($expected, $result
->all());
$this
->assertSame([], $request->attributes
->all());
}