8000 [10.x] Add missing asserts in http tests (#8769) · Sn0wCrack/laravel-docs@0e26da4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e26da4

Browse files
authored
[10.x] Add missing asserts in http tests (laravel#8769)
* add `assertInternalServerError` into http-tests * add `assertServiceUnavailable` in http-tests * fix description for `assertServiceUnavailable` and `assertInternalServerError` * fix `assertServerError`
1 parent e2ddb4c commit 0e26da4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

http-tests.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ Laravel's `Illuminate\Testing\TestResponse` class provides a variety of custom a
626626
[assertGone](#assert-gone)
627627
[assertHeader](#assert-header)
628628
[assertHeaderMissing](#assert-header-missing)
629+
[assertInternalServerError](#assert-internal-server-error)
629630
[assertJson](#assert-json)
630631
[assertJsonCount](#assert-json-count)
631632
[assertJsonFragment](#assert-json-fragment)
@@ -658,6 +659,7 @@ Laravel's `Illuminate\Testing\TestResponse` class provides a variety of custom a
658659
[assertSeeText](#assert-see-text)
659660
[assertSeeTextInOrder](#assert-see-text-in-order)
660661
[assertServerError](#assert-server-error)
662+
[assertServiceUnavailable](#assert-server-unavailable)
661663
[assertSessionHas](#assert-session-has)
662664
[assertSessionHasInput](#assert-session-has-input)
663665
[assertSessionHasAll](#assert-session-has-all)
@@ -804,6 +806,13 @@ Assert that the given header is not present on the response:
804806

805807
$response->assertHeaderMissing($headerName);
806808

809+
<a name="assert-internal-server-error"></a>
810+
#### assertInternalServerError
811+
812+
Assert that the response has an "Internal Server Error" (500) HTTP status code:
813+
814+
$response->assertInternalServerError();
815+
807816
<a name="assert-json"></a>
808817
#### assertJson
809818

@@ -1123,6 +1132,13 @@ Assert that the response has a server error (>= 500 , < 600) HTTP status code:
11231132

11241133
$response->assertServerError();
11251134

1135+
<a name="assert-server-unavailable"></a>
1136+
#### assertServiceUnavailable
1137+
1138+
Assert that the response has a "Service Unavailable" (503) HTTP status code:
1139+
1140+
$response->assertServiceUnavailable();
1141+
11261142
<a name="assert-session-has"></a>
11271143
#### assertSessionHas
11281144

0 commit comments

Comments
 (0)
0