Skip to content

Commit 22aa8ab

Browse files
committed
[12.x] Add assertClientError method to http-tests
1 parent ae9a6f5 commit 22aa8ab

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
@@ -967,6 +967,7 @@ Laravel's `Illuminate\Testing\TestResponse` class provides a variety of custom a
967967
[assertCookieNotExpired](#assert-cookie-not-expired)
968968
[assertCookieMissing](#assert-cookie-missing)
969969
[assertCreated](#assert-created)
970+
[assertClientError](#assert-client-error)
970971
[assertDontSee](#assert-dont-see)
971972
[assertDontSeeText](#assert-dont-see-text)
972973
[assertDownload](#assert-download)
@@ -1109,6 +1110,15 @@ Assert that the response has a 201 HTTP status code:
11091110
$response->assertCreated();
11101111
```
11111112

1113+
<a name="assert-client-error"></a>
1114+
#### assertClientError
1115+
1116+
Assert that the response has a client error (>= 400 , < 500) HTTP status code:
1117+
1118+
```php
1119+
$response->assertClientError();
1120+
```
1121+
11121122
<a name="assert-dont-see"></a>
11131123
#### assertDontSee
11141124

0 commit comments

Comments
 (0)