-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add a failure test where / is appended once it move to next middleware #25
Conversation
}); | ||
$request = new Request([], [], 'http://local.example.com/admin', 'GET', 'php://memory'); | ||
$result = $this->middleware->__invoke($request, $this->response); | ||
$body = (string) $this->response->getBody(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be pulling the body from the $result
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the test is still valid, as the body of the request is mutable (as it's a stream). And travis does indeed show it failing -- will get a solution in place today -- thanks for the test case!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Do I need to change it ?
If you like to try a gist https://gist.github.com/harikt/9d5546623dfc8bcee711 |
Add a failure test where / is appended once it move to next middleware
Added another test case to test for the inverse condition -- that a trailing slash **is** present if it was present in the original route. The fix requires ensuring that the original route is retained, but that matching is done without trailing slashes. At the same time, the original route must be retained so that the path is reset correctly -- without double slashes.
No description provided.