function RouteSubscriberTest::testRouteRebuildFinished
Same name in other branches
- 8.9.x 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 70
Class
- RouteSubscriberTest
- @coversDefaultClass \Drupal\views\EventSubscriber\RouteSubscriber @group views
Namespace
Drupal\Tests\views\Unit\EventSubscriberCode
public function testRouteRebuildFinished() {
[
$display_1,
$display_2,
] = $this->setupMocks();
$display_1->expects($this->once())
->method('collectRoutes')
->willReturn([
'test_id.page_1' => 'views.test_id.page_1',
]);
$display_2->expects($this->once())
->method('collectRoutes')
->willReturn([
'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.