-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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.5] Add followingRedirects() method #21771
Conversation
Are you thinking of the old laravel/browser-kit-testing which was default in 5.3? It has a followRedirects() method. |
That's the one. Happy to match the naming too if preferred. |
I don't really like how if you call this in one test method it's not going to apply to all test methods that run after that in that class. How would I disable it? Shouldn't it be disabled after each test? |
I had tested for that and it appeared to reset between tests in the same class for me. However, I've now explicitly set |
Clean and sweet. |
So there is no possibility to make all test methods follow redirects automatically right now? |
Is it normal that this method persists an app state between calls? Ex when I put |
This adds a test helper method called
followingRedirects()
that will instruct the the test case to follow any redirect responses automatically. It can be chained prior to making a HTTP request and it's named to read more sentence-like.From memory a similar test helper used to exist in an earlier iteration of Laravel's test suite, so this is just returning the functionality. It was prompted by #18016.