@@ -708,16 +708,16 @@ public function testFragmentsCanBeDefinedAsDefaults()
708
708
*/
709
709
public function testLookRoundRequirementsInPath ($ expected , $ path , $ requirement )
710
710
{
711
- $ routes = $ this ->getRoutes ('test ' , new Route ($ path , array (), array ( 'foo ' => $ requirement , 'baz ' => '.+? ' ) ));
712
- $ this ->assertSame ($ expected , $ this ->getGenerator ($ routes )->generate ('test ' , array ( 'foo ' => 'a/b ' , 'baz ' => 'c/d/e ' ) ));
711
+ $ routes = $ this ->getRoutes ('test ' , new Route ($ path , [], [ 'foo ' => $ requirement , 'baz ' => '.+? ' ] ));
712
+ $ this ->assertSame ($ expected , $ this ->getGenerator ($ routes )->generate ('test ' , [ 'foo ' => 'a/b ' , 'baz ' => 'c/d/e ' ] ));
713
713
}
714
714
715
715
public function provideLookAroundRequirementsInPath ()
716
716
{
717
- yield array ( '/app.php/a/b/b%28ar/c/d/e ' , '/{foo}/b(ar/{baz} ' , '.+(?=/b \\(ar/) ' ) ;
718
- yield array ( '/app.php/a/b/bar/c/d/e ' , '/{foo}/bar/{baz} ' , '.+(?!$) ' ) ;
719
- yield array ( '/app.php/bar/a/b/bam/c/d/e ' , '/bar/{foo}/bam/{baz} ' , '(?<=/bar/).+ ' ) ;
720
- yield array ( '/app.php/bar/a/b/bam/c/d/e ' , '/bar/{foo}/bam/{baz} ' , '(?<!^).+ ' ) ;
717
+ yield [ '/app.php/a/b/b%28ar/c/d/e ' , '/{foo}/b(ar/{baz} ' , '.+(?=/b \\(ar/) ' ] ;
718
+ yield [ '/app.php/a/b/bar/c/d/e ' , '/{foo}/bar/{baz} ' , '.+(?!$) ' ] ;
719
+ yield [ '/app.php/bar/a/b/bam/c/d/e ' , '/bar/{foo}/bam/{baz} ' , '(?<=/bar/).+ ' ] ;
720
+ yield [ '/app.php/bar/a/b/bam/c/d/e ' , '/bar/{foo}/bam/{baz} ' , '(?<!^).+ ' ] ;
721
721
}
722
722
723
723
protected function getGenerator (RouteCollection $ routes , array $ parameters = [], $ logger = null )
0 commit comments