public function get($path, $options, $requirements = []) { return $this->addRoute($path, $options, $requirements)->setMethods([Request::METHOD_GET, Request::METHOD_HEAD]); }
/** * @test */ public function testGet() { $route = $this->app->get('/path', function () { /* do nothing */ }); $this->assertTrue($route->hasMethod(Request::METHOD_HEAD)); $this->assertTrue($route->hasMethod(Request::METHOD_GET)); $this->assertFalse($route->hasMethod(Request::METHOD_POST)); }