8000 [Router] regression when matching a route · symfony/symfony@44616d9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 44616d9

Browse files
nanocomnicolas-grekas
authored andcommitted
[Router] regression when matching a route
1 parent 7a750d4 commit 44616d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,18 @@ public function testMatchRegression()
245245
}
246246
}
247247

248+
public function testMultipleParams()
249+
{
250+
$coll = new RouteCollection();
251+
$coll->add('foo1', new Route('/foo/{a}/{b}'));
252+
$coll->add('foo2', new Route('/foo/{a}/test/test/{b}'));
253+
$coll->add('foo3', new Route('/foo/{a}/{b}/{c}/{d}'));
254+
255+
$route = $this->getUrlMatcher($coll)->match('/foo/test/test/test/bar')['_route'];
256+
257+
$this->assertEquals('foo2', $route);
258+
}
259+
248260
public function testDefaultRequirementForOptionalVariables()
249261
{
250262
$coll = new RouteCollection();

0 commit comments

Comments
 (0)
0