protected function checkHttpMethod(ServerRequestInterface $request, Route $route) : bool { return in_array($request->getMethod(), $route->getMethods()); }
/** * @depends testConstructorSetsAttributes */ public function testGetMethodsReturnsListOfMethods() { $given = $expected = ['GET', 'POST']; $instance = new Route($given, $this->dummyResource, $this->dummyHandler); $this->assertEquals($expected, $instance->getMethods()); }