Skip to content

Commit 278342b

Browse files
committed
Added test for percent-encoded URLs.
1 parent d2ade90 commit 278342b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Tests/Unit/Doctrine/Phpcr/PrefixCandidatesTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,28 @@ public function testGetCandidates()
5050
);
5151
}
5252

53+
public function testGetCandidatesPercentEncoded()
54+
{
55+
$request = Request::create('/my/path%20percent%20encoded.html');
56+
57+
$candidates = new PrefixCandidates(array('/routes', '/simple'));
58+
$paths = $candidates->getCandidates($request);
59+
60+
$this->assertEquals(
61+
array(
62+
'/routes/my/path percent encoded.html',
63+
'/routes/my/path percent encoded',
64+
'/routes/my',
65+
'/routes',
66+
'/simple/my/path percent encoded.html',
67+
'/simple/my/path percent encoded',
68+
'/simple/my',
69+
'/simple',
70+
),
71+
$paths
72+
);
73+
}
74+
5375
public function testGetCandidatesLocales()
5476
{
5577
$request = Request::create('/de/path.html');

0 commit comments

Comments
 (0)