File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 33namespace Inertia \Tests ;
44
55use Illuminate \Filesystem \Filesystem ;
6+ use Illuminate \Support \Facades \Blade ;
67use Illuminate \Support \Facades \Config ;
78use Illuminate \View \Compilers \BladeCompiler ;
89use Illuminate \View \Engines \PhpEngine ;
@@ -50,6 +51,11 @@ protected function tearDown(): void
5051
5152 protected function renderView ($ contents , $ data = [])
5253 {
54+ // Laravel 8+ only: https://github.com/laravel/framework/pull/40425
55+ if (method_exists (BladeCompiler::class, 'render ' )) {
56+ return Blade::render ($ contents , $ data , false );
57+ }
58+
5359 // First, we'll create a temporary file, and use compileString to 'emulate' compilation of our view.
5460 // This skips caching, and a bunch of other logic that's not relevant for what we need here.
5561 $ path = tempnam (sys_get_temp_dir (), 'inertia_tests_render_ ' );
You can’t perform that action at this time.
0 commit comments