public function testMethodNotAllowed() {
$coll = new RouteCollection();
$coll
->add('foo', new Route('/foo', array(), array(
'_method' => 'post',
)));
$matcher = new UrlMatcher($coll, new RequestContext());
try {
$matcher
->match('/foo');
$this
->fail();
} catch (MethodNotAllowedException $e) {
$this
->assertEquals(array(
'POST',
), $e
->getAllowedMethods());
}
}