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

[8.x] Allow testing of Blade components that return closures #36919

Merged

Conversation

mpociot
Copy link
Contributor

@mpociot mpociot commented Apr 8, 2021

A Blade component can not only return a view or an HTML string but also a closure, that gets evaluated to retrieve the actual view.
The test helper for Blade components did not yet support this and resulted in an exception. This PR fixes this by evaluating the closure with the view data (just like it is done when rendering components).

@taylorotwell taylorotwell merged commit 94fd966 into laravel:8.x Apr 8, 2021
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