public function RouteSubscriberTest::testRouteRebuildFinished in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php \Drupal\Tests\views\Unit\EventSubscriber\RouteSubscriberTest::testRouteRebuildFinished()
@covers ::routeRebuildFinished
File
- core/
modules/ views/ tests/ src/ Unit/ EventSubscriber/ RouteSubscriberTest.php, line 66 - Contains \Drupal\Tests\views\Unit\EventSubscriber\RouteSubscriberTest.
Class
- RouteSubscriberTest
- @coversDefaultClass \Drupal\views\EventSubscriber\RouteSubscriber @group views
Namespace
Drupal\Tests\views\Unit\EventSubscriberCode
public function testRouteRebuildFinished() {
list($display_1, $display_2) = $this
->setupMocks();
$display_1
->expects($this
->once())
->method('collectRoutes')
->will($this
->returnValue(array(
'test_id.page_1' => 'views.test_id.page_1',
)));
$display_2
->expects($this
->once())
->method('collectRoutes')
->will($this
->returnValue(array(
'test_id.page_2' => 'views.test_id.page_2',
)));
$this->routeSubscriber
->routes();
$this->state
->expects($this
->once())
->method('set')
->with('views.view_route_names', array(
'test_id.page_1' => 'views.test_id.page_1',
'test_id.page_2' => 'views.test_id.page_2',
));
$this->routeSubscriber
->routeRebuildFinished();
}