Skip to content

Commit

Permalink
Merge pull request #4176 from ottoszika/test-response-assertions
Browse files Browse the repository at this point in the history
[5.6] Add assertForbidden and assertNotFound to HTTP Tests
  • Loading branch information
taylorotwell authored Mar 17, 2018
2 parents 292e285 + 3cbc7d6 commit 3840604
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions http-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ Laravel provides a variety of custom assertion methods for your [PHPUnit](https:
[assertDontSee](#assert-dont-see)
[assertDontSeeText](#assert-dont-see-text)
[assertExactJson](#assert-exact-json)
[assertForbidden](#assert-forbidden)
[assertHeader](#assert-header)
[assertHeaderMissing](#assert-header-missing)
[assertJson](#assert-json)
Expand All @@ -239,6 +240,7 @@ Laravel provides a variety of custom assertion methods for your [PHPUnit](https:
[assertJsonMissingExact](#assert-json-missing-exact)
[assertJsonStructure](#assert-json-structure)
[assertJsonValidationErrors](#assert-json-validation-errors)
[assertNotFound](#assert-not-found)
[assertPlainCookie](#assert-plain-cookie)
[assertRedirect](#assert-redirect)
[assertSee](#assert-see)
Expand Down Expand Up @@ -301,6 +303,13 @@ Assert that the response contains an exact match of the given JSON data:

$response->assertExactJson(array $data);

<a name="assert-forbidden"></a>
#### assertForbidden

Assert that the response has a forbidden status code:

$response->assertForbidden();

<a name="assert-header"></a>
#### assertHeader

Expand Down Expand Up @@ -357,6 +366,13 @@ Assert that the response has the given JSON validation errors for the given keys

$response->assertJsonValidationErrors($keys);

<a name="assert-not-found"></a>
#### assertNotFound

Assert that the response has a not found status code:

$response->assertNotFound();

<a name="assert-plain-cookie"></a>
#### assertPlainCookie

Expand Down

0 comments on commit 3840604

Please sign in to comment.