public function UrlMatcherTest::testMethodNotAllowed in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php \Symfony\Component\Routing\Tests\Matcher\UrlMatcherTest::testMethodNotAllowed()
File
- vendor/
symfony/ routing/ Tests/ Matcher/ UrlMatcherTest.php, line 32
Class
Namespace
Symfony\Component\Routing\Tests\MatcherCode
public function testMethodNotAllowed() {
$coll = new RouteCollection();
$coll
->add('foo', new Route('/foo', array(), array(), array(), '', array(), array(
'post',
)));
$matcher = new UrlMatcher($coll, new RequestContext());
try {
$matcher
->match('/foo');
$this
->fail();
} catch (MethodNotAllowedException $e) {
$this
->assertEquals(array(
'POST',
), $e
->getAllowedMethods());
}
}