/** * @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)); }
/** * {@inheritdoc} * @see Application::get() */ public function get($path, $options, $requirements = []) { return parent::get($path, $options, $requirements)->addMethod(Request::METHOD_OPTIONS); }