diff --git a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php index 143e3448a29c1..366695634e3d4 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -242,6 +242,12 @@ public function testRequiredParamAndEmptyPassed() $this->getGenerator($routes)->generate('test', array('slug' => '')); } + public function testLookAroundInRequirements() + { + $routes = $this->getRoutes('test', new Route('/{foo}/bar/{baz}', array(), array('foo' => '.+(?=/bar/)', 'baz' => '.+?'))); + $this->assertSame('/app.php/a/b/bar/c/d/e', $this->getGenerator($routes)->generate('test', array('foo' => 'a/b', 'baz' => 'c/d/e'))); + } + public function testSchemeRequirementDoesNothingIfSameCurrentScheme() { $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); // BC