Repository navigation
[5.6] Fix assertRedirect - #23176
Merged
taylorotwell merged 1 commit intoFeb 15, 2018
Merged
[5.6] Fix assertRedirect#23176taylorotwell merged 1 commit into
taylorotwell merged 1 commit into
Conversation
Redirect routes are supposed to return a 301 code. Any other code would be an error. |
Contributor
Author
|
@36864 Sorry but, I disagree with you since 3xx codes are all redirect codes, and for example, default code for |
|
Apologies, I should have been more explicit. The tests are explicitly passing the status code 301 into the Route::redirect method. In this case, any status code other than the supplied status code should be considered an error. |
Contributor
Author
|
@36864 No problem. Yes, exactly you're right. |
salmanarshad321
pushed a commit
to salmanarshad321/framework
that referenced
this pull request
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow to #23170 :
but this retains the original tests.
However
assertRedirectis operating an equal behavior to original tests and even better by asserting any redirect type, not just 301 one. Plus, accepting both urls and uris equally.