Skip to content
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.7] Add getStreamedContent to TestResponse class #25469

Merged
merged 1 commit into from
Sep 13, 2018

Conversation

stidges
Copy link
Contributor

@stidges stidges commented Sep 5, 2018

This PR adds a new getStreamedContent method to the TestResponse class. The main reason for adding this is to be able to test the response content coming from a Storage::download()call, but it can be applied for any streamed response testing.

The content is cached on the class because Symfony's StreamedResponse class only streams it once. This would allow the user to call this method multiple times without having to worry if the content was already streamed or not.

@taylorotwell taylorotwell merged commit 6139630 into laravel:5.7 Sep 13, 2018
@stidges stidges deleted the 5.7-streamed-content branch September 19, 2018 10:48
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.

None yet

2 participants