Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[12.x] Add assertRedirectBack assertion method #55635

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

Merged
merged 1 commit into from
May 5, 2025

Conversation

ryangjchandler
Copy link
Contributor

This pull request implements a new assertRedirectBack() method that ensures the response's Location header is the same as the previous URL produced by UrlGenerator.

I believe this is a nice convenience helper method compared to the alternative ->assertRedirect("enter-expected-previous-url-here").

@taylorotwell taylorotwell merged commit 6d825ed into laravel:12.x May 5, 2025
59 of 60 checks passed
@AhmedAlaa4611
Copy link
Contributor

Is this documented yet?

@AndrewMast
Copy link
Contributor

Is this documented yet?

@AhmedAlaa4611 I've seen you post this on quite a few PRs (and some really old PRs). Considering this was merged 4 hours before you asked, no, it probably hasn't been documented yet. Instead of asking this, please check the documentation on the Laravel website or the laravel/docs repo. I know you are active in opening PRs on that repo, so you should already know this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants