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

[9.x] Add assertBadRequest to the TestResponse. #44658

Closed
wants to merge 1 commit into from
Closed

[9.x] Add assertBadRequest to the TestResponse. #44658

wants to merge 1 commit into from

Conversation

xiCO2k
Copy link
Contributor

@xiCO2k xiCO2k commented Oct 19, 2022

This PR adds the assertBadRequest to the TestResponse class.

This will allow to use:

$response->assertBadRequest();

instead of:

$response->assertStatus(400);

This one was also submitted in the past by @michael-rubel on #43047.

@rschoonheim
Copy link

rschoonheim commented Oct 19, 2022

Are there any other common response status assertions missing? I assume we want to have a consistent API right?

@taylorotwell
Copy link
Member

I don't really want to add a method for every response code. 😬

@xiCO2k xiCO2k deleted the feat/add-assert-bad-request branch October 19, 2022 15:37
@xiCO2k
Copy link
Contributor Author

xiCO2k commented Oct 19, 2022

Got it

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.

3 participants