function RouteSubscriberTest::testRouteRebuildFinished
Same name in other branches
- 9 core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php \Drupal\Tests\views\Unit\EventSubscriber\RouteSubscriberTest::testRouteRebuildFinished()
- 10 core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php \Drupal\Tests\views\Unit\EventSubscriber\RouteSubscriberTest::testRouteRebuildFinished()
- 11.x 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 67
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([
'test_id.page_1' => 'views.test_id.page_1',
]));
$display_2->expects($this->once())
->method('collectRoutes')
->will($this->returnValue([
'test_id.page_2' => 'views.test_id.page_2',
]));
$this->routeSubscriber
->routes();
$this->state
->expects($this->once())
->method('set')
->with('views.view_route_names', [
'test_id.page_1' => 'views.test_id.page_1',
'test_id.page_2' => 'views.test_id.page_2',
]);
$this->routeSubscriber
->routeRebuildFinished();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.