From 70f939715f1ff9306e2ff568d025285cbb4f6cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 25 Aug 2025 16:12:54 +0200 Subject: [PATCH] Re-add file creation logic --- tests/Features/ViteBundlerTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Features/ViteBundlerTest.php b/tests/Features/ViteBundlerTest.php index 921528b0..3934698f 100644 --- a/tests/Features/ViteBundlerTest.php +++ b/tests/Features/ViteBundlerTest.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Illuminate\Foundation\Vite; +use Illuminate\Support\Facades\File; use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper; use Stancl\Tenancy\Features\ViteBundler; use Stancl\Tenancy\Tests\Etc\Tenant; @@ -14,6 +15,14 @@ beforeEach(function () { 'tenancy.filesystem.asset_helper_override' => true, 'tenancy.bootstrappers' => [FilesystemTenancyBootstrapper::class], ]); + + File::ensureDirectoryExists(dirname($manifestPath = public_path('build/manifest.json'))); + File::put($manifestPath, json_encode([ + 'foo' => [ + 'file' => 'assets/foo-AbC123.js', + 'src' => 'js/foo.js', + ], + ])); }); test('vite bundler ensures vite assets use global_asset when asset_helper_override is enabled', function () {