Пример #1
0
 function testMethodNotAllowedMatch()
 {
     $this->cache->get("router")->shouldBeCalled()->willReturn(TestResource::expectedTable());
     $router = new Router($this->cache->reveal(), new UrlTools());
     $resources = array(__NAMESPACE__ . "\\TestResource");
     $match = $router->match($resources, "POST", "/this/is/static");
     $this->assertEquals(Router::METHOD_NOT_ALLOWED, $match->status, "Match");
     $this->assertEquals(array("GET"), $match->allowed, "Allowed");
 }