/** * Checks if the Route is allowed to be executed. * @param \Brickoo\Component\Routing\Route\HttpRoute $route * @return boolean check result */ private function isAllowedRoute(HttpRoute $route) { return $this->doesPropertyMatch($route->getMethod(), $this->request->getMethod()->toString()) && $this->doesPropertyMatch($route->getHostname(), $this->request->getUri()->getHostname()) && $this->doesPropertyMatch($route->getScheme(), $this->request->getUri()->getScheme()); }
/** @covers Brickoo\Component\Http\HttpRequest::getMethod */ public function testGetMethod() { $method = $this->getHttpMethodStub(); $httpRequest = new HttpRequest($method, $this->getHttpVersionStub(), $this->getHttpUriStub(), $this->getHttpMessageStub()); $this->assertSame($method, $httpRequest->getMethod()); }