Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] Add assertForbidden and assertNotFound to HTTP Tests #4176

Merged
merged 1 commit into from
Mar 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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