8000 [Routing] added test for disabled requirements check · symfony/symfony@1964d43 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1964d43

Browse files
committed
[Routing] added test for disabled requirements check
1 parent 98fb915 commit 1964d43

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php

Lines changed: 8 additions & 0 deletions
< 82C6 /tr>
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,14 @@ public function testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLog
219219
$this->assertNull($generator->generate('test', array('foo' => 'bar'), true));
220220
}
221221

222+
public function testGenerateForRouteWithInvalidParameterButDisabledRequirementsCheck()
223+
{
224+
$routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+')));
225+
$generator = $this->getGenerator($routes);
226+
$generator->setStrictRequirements(null);
227+
$this->assertSame('/app.php/testing/bar', $generator->generate('test', array('foo' => 'bar')));
228+
}
229+
222230
/**
223231
* @expectedException Symfony\Component\Routing\Exception\InvalidParameterException
224232
*/

0 commit comments

Comments
 (0)
0