MethodNotAllowedHttpException when testing on Lumen 5.6


MethodNotAllowedHttpException when testing on Lumen 5.6



I am testing a Lumen 5.6 API .



Here is my route:


$router->delete('/tournaments/{slug}', 'TournamentController@destroy');



When consuming with Angular 6, I have no problem, route is working, but when I try to test with PHPUnit with:


$this->call('DELETE', '/tournaments/' . $tournament->slug);



I get a MethodNotAllowedHttpException


MethodNotAllowedHttpException



Why ?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV