forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] Add bad request test response assertion
Inspired by PR laravel#38553. A readability enhancement in the same manner. Just like `assertOk`, `assertUnauthorized` and company this adds an `assertBadRequest` to ensure that a [400 Bad Request](https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1) was sent in the response. The intention is to increase readability and add broader support to the existing suite of response code assertions which are much easier to understand. This introduces no breaking changes since it does not modify any existing methods. Also introduced a test case for the assert error path and the path where there is no assertion error.
- Loading branch information
1 parent
cf58af1
commit cff40e6
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters