Skip to content
Closed
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
22 changes: 22 additions & 0 deletions http-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,8 @@ Laravel's `Illuminate\Testing\TestResponse` class provides a variety of custom a
[assertPlainCookie](#assert-plain-cookie)
[assertRedirect](#assert-redirect)
[assertRedirectBack](#assert-redirect-back)
[assertRedirectBackWithErrors](#assert-redirect-back-with-errors)
[assertRedirectBackWithoutErrors](#assert-redirect-back-without-errors)
[assertRedirectContains](#assert-redirect-contains)
[assertRedirectToRoute](#assert-redirect-to-route)
[assertRedirectToSignedRoute](#assert-redirect-to-signed-route)
Expand Down Expand Up @@ -1561,6 +1563,26 @@ Assert whether the response is redirecting back to the previous page:
$response->assertRedirectBack();
```

<a name="assert-redirect-back-with-errors"></a>
#### assertRedirectBackWithErrors

Assert whether the response is redirecting back to the previous page with the given errors in the session. This method accepts the same parameters as [assertSessionHasErrors](#assert-session-has-errors):

```php
$response->assertRedirectBackWithErrors(
array $keys = [], $format = null, $errorBag = 'default'
);
```

<a name="assert-redirect-back-without-errors"></a>
#### assertRedirectBackWithoutErrors

Assert whether the response is redirecting back to the previous page with no errors in the session:

```php
$response->assertRedirectBackWithoutErrors();
```

<a name="assert-redirect-contains"></a>
#### assertRedirectContains

Expand Down