Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Add a method assertMethodNotAllowed to AssertsStatusCodes #47169

Merged
merged 2 commits into from
May 23, 2023
Merged

[10.x] Add a method assertMethodNotAllowed to AssertsStatusCodes #47169

merged 2 commits into from
May 23, 2023

Conversation

azim-kordpour
Copy link
Contributor

This method is useful When we want to make sure an endpoint is not accessible by the other HTTP methods.

$this->get('/')->assertOk();

$this->post('/')->assertMethodNotAllowed();
$this->patch('/')->assertMethodNotAllowed();
$this->put('/')->assertMethodNotAllowed();
$this->delete('/')->assertMethodNotAllowed();

@taylorotwell taylorotwell merged commit c8ba769 into laravel:10.x May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants