Skip to content

Commit

Permalink
[Routing] added test for disabled requirements check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobion committed Aug 30, 2012
1 parent 4225869 commit 5f64503
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -207,6 +207,14 @@ public function testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLog
$this->assertNull($generator->generate('test', array('foo' => 'bar'), true));
}

public function testGenerateForRouteWithInvalidParameterButDisabledRequirementsCheck()
{
$routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+')));
$generator = $this->getGenerator($routes);
$generator->setStrictRequirements(null);
$this->assertSame('/app.php/testing/bar', $generator->generate('test', array('foo' => 'bar')));
}

/**
* @expectedException Symfony\Component\Routing\Exception\InvalidParameterException
*/
Expand Down

0 comments on commit 5f64503

Please sign in to comment.