Skip to content

Commit 3492a01

Browse files
authored
[12.x] Add assertClientError method to http-tests (#10416)
1 parent 3c0bfd3 commit 3492a01

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎http-tests.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,7 @@ Laravel's `Illuminate\Testing\TestResponse` class provides a variety of custom a
961961

962962
[assertAccepted](#assert-accepted)
963963
[assertBadRequest](#assert-bad-request)
964+
[assertClientError](#assert-client-error)
964965
[assertConflict](#assert-conflict)
965966
[assertCookie](#assert-cookie)
966967
[assertCookieExpired](#assert-cookie-expired)
@@ -1055,6 +1056,15 @@ Assert that the response has an accepted (202) HTTP status code:
10551056
$response->assertAccepted();
10561057
```
10571058

1059+
<a name="assert-client-error"></a>
1060+
#### assertClientError
1061+
1062+
Assert that the response has a client error (>= 400 , < 500) HTTP status code:
1063+
1064+
```php
1065+
$response->assertClientError();
1066+
```
1067+
10581068
<a name="assert-conflict"></a>
10591069
#### assertConflict
10601070

0 commit comments

Comments
 (0)