Skip to content

[5.6] Added assertUri method to TestReponse - #24267

Merged
taylorotwell merged 2 commits into
laravel:5.6from
gsingh1:5.6
May 21, 2018
Merged

taylorotwell merged 2 commits into
laravel:5.6from
gsingh1:5.6

Conversation

@gsingh1

@gsingh1 gsingh1 commented May 21, 2018 •

Copy link
Copy Markdown
Contributor

This PR is to add a simple helper to facilitate the checking of the TestResponse URI to ensure that in a test, when doing a request, the TestResponse correctly goes to an expectant URI.

Example:
$response->assertUri($uri);
instead of
$response->assertHeader('Location', $uri);

@taylorotwell
taylorotwell merged commit 378ca9d into laravel:5.6 May 21, 2018
@gsingh1

gsingh1 commented May 21, 2018

Copy link
Copy Markdown
Contributor Author

This would be great to have in the 5.5 branch too. How can I request this?
@taylorotwell
Thanks

@antonkomarev

Copy link
Copy Markdown
Contributor

Maybe it was better to name it assertLocation?

@gsingh1

gsingh1 commented May 21, 2018

Copy link
Copy Markdown
Contributor Author

Already done - see here

@antonkomarev

Copy link
Copy Markdown
Contributor

Great, thanks. It will be much more clear now.

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.

3 participants