/** * @expectedException \Routy\Exceptions\MethodNotAllowed */ public function testEmulateDisallowedRequestWhenTheMethodMatchesThrowsException() { $_SERVER['REQUEST_METHOD'] = 'POST'; $_SERVER['REQUEST_URI'] = '/some/query'; $_POST['_method'] = 'PUT'; $config = new Configuration(); $config->emulatedMethods = ['POST']; Request::fromCurrentRequest($config); }
public function matchCurrentRequest() { return $this->match(Request::fromCurrentRequest($this->configuration)); }