public function test_route_methods() { $router = new Router(); $router->get('get', '_get'); $router->head('head', '_head'); $router->post('post', '_post'); $router->put('put', '_put'); $router->update('update', '_update'); $router->patch('patch', '_patch'); $router->delete('delete', '_delete'); $router->options('options', '_options'); $routes = $router->getRoutes(); $this->assertEquals('_get', array_shift($routes)->getAction()); $this->assertEquals('_head', array_shift($routes)->getAction()); $this->assertEquals('_post', array_shift($routes)->getAction()); $this->assertEquals('_put', array_shift($routes)->getAction()); $this->assertEquals('_update', array_shift($routes)->getAction()); $this->assertEquals('_patch', array_shift($routes)->getAction()); $this->assertEquals('_delete', array_shift($routes)->getAction()); $this->assertEquals('_options', array_shift($routes)->getAction()); }