$id_parts =
explode('.',
$id);
$this->
assertEquals($id_parts[1
],
$route->
getDefault('view_id'
));
$this->
assertEquals($id_parts[2
],
$route->
getDefault('display_id'
));
} // Check the generated patterns and default values.
$route =
$collection->
get('view.test_page_display_route.page_1'
);
$this->
assertEquals('/test_route_without_arguments',
$route->
getPath());
$route =
$collection->
get('view.test_page_display_route.page_2'
);
$this->
assertEquals('/test_route_with_argument/{arg_0}',
$route->
getPath());
$this->
assertTrue($route->
hasDefault('arg_0'
), 'A default value is set for the optional argument id.'
);
$route =
$collection->
get('view.test_page_display_route.page_3'
);
$this->
assertEquals('/test_route_with_argument/{arg_0}/suffix',
$route->
getPath());
$this->
assertFalse($route->
hasDefault('arg_0'
), 'No default value is set for the required argument id.'
);
$route =
$collection->
get('view.test_page_display_route.page_4'
);
$this->
assertEquals('/test_route_with_argument/{arg_0}/suffix/{arg_1}',
$route->
getPath());
$this->
assertFalse($route->
hasDefault('arg_0'
), 'No default value is set for the required argument id.'
);
$this->
assertTrue($route->
hasDefault('arg_1'
), 'A default value is set for the optional argument id_2.'
);
$route =
$collection->
get('view.test_page_display_route.page_5'
);