public function testGrouping(array
$routes,
$expected) { $collection =
new StaticPrefixCollection('/'
);
foreach ($routes as $route) { [$path,
$name] =
$route;
$staticPrefix =
(new Route($path))->
compile()->
getStaticPrefix();
$collection->
addRoute($staticPrefix,
[$name]);
} $dumped =
$this->
dumpCollection($collection);
$this->
assertEquals($expected,
$dumped);
} public static function routeProvider() { return [ 'Simple - not nested' =>
[ [ ['/', 'root'
],
['/prefix/segment/', 'prefix_segment'
],
['/leading/segment/', 'leading_segment'
],
],