$route =
$collection->
get('view.test_page_display_route.page_6'
);
$this->
assertEquals('/test_route_with_argument/{arg_0}/{arg_1}',
$route->
getPath());
$this->
assertFalse($route->
hasDefault('arg_0'
), 'No default value is set for the required argument id.'
);
$this->
assertFalse($route->
hasDefault('arg_1'
), 'No default value is set for the required argument id_2.'
);
} /**
* Tests the generated menu links of views.
*/
public function testMenuLinks() { \Drupal::
service('plugin.manager.menu.link'
)->
rebuild();
$tree = \Drupal::
menuTree()->
load('admin',
new MenuTreeParameters());
$this->
assertTrue(isset($tree['system.admin'
]->subtree
['views_view:views.test_page_display_menu.page_4'
]));
$menu_link =
$tree['system.admin'
]->subtree
['views_view:views.test_page_display_menu.page_4'
]->link;
$this->
assertEquals('Test child (with parent)',
$menu_link->
getTitle());
$this->
assertEquals(TRUE,
$menu_link->
isExpanded());
$this->
assertEquals('Sample description.',
$menu_link->
getDescription());
} /**
* Tests the calculated dependencies for various views using Page displays.
*/
public function testDependencies() {