You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Route] Better inline requirements and defaults parsing
Remove ! symbol from requirements and defaults array keys in Route class. Leave ! symbol in Route compiled path for correct token creation
Added some inline route settings tests
Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Tests/RouteTest.php
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,14 @@ public function testPath()
50
50
$this->assertEquals($route, $route->setPath(''), '->setPath() implements a fluent interface');
51
51
$route->setPath('//path');
52
52
$this->assertEquals('/path', $route->getPath(), '->setPath() does not allow two slashes "//" at the beginning of the path as it would be confused with a network path when generating the path from the route');
53
+
$route->setPath('/path/{!foo}');
54
+
$this->assertEquals('/path/{!foo}', $route->getPath(), '->setPath() keeps ! to pass important params');
0 commit comments