diff --git a/tests/Concerns/UsesGeneratorOverridesTest.php b/tests/Concerns/UsesGeneratorOverridesTest.php index 3eec672..5bf79ba 100644 --- a/tests/Concerns/UsesGeneratorOverridesTest.php +++ b/tests/Concerns/UsesGeneratorOverridesTest.php @@ -10,6 +10,8 @@ use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; +use function Illuminate\Filesystem\join_paths; + class UsesGeneratorOverridesTest extends TestCase { /** @@ -20,13 +22,13 @@ protected function setUp(): void $filesystem = new Filesystem(); $this->afterApplicationCreated(static function () use ($filesystem) { - $filesystem->ensureDirectoryExists(base_path('app/Events')); - $filesystem->ensureDirectoryExists(base_path('app/Models')); + $filesystem->ensureDirectoryExists(join_paths(base_path('app'), 'Events')); + $filesystem->ensureDirectoryExists(join_paths(base_path('app'), 'Models')); }); $this->beforeApplicationDestroyed(static function () use ($filesystem) { - $filesystem->deleteDirectory(base_path('app/Events')); - $filesystem->deleteDirectory(base_path('app/Models')); + $filesystem->deleteDirectory(join_paths(base_path('app'), 'Events')); + $filesystem->deleteDirectory(join_paths(base_path('app'), 'Models')); }); parent::setUp(); @@ -39,7 +41,7 @@ public function it_can_get_qualify_model_class() $this->assertSame([ 'user-model' => 'App\Models\User', - 'welcome-view' => $this->app->joinPaths(base_path('resources'.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'welcome.blade.php')), + 'welcome-view' => join_paths(base_path('resources'), 'views', 'welcome.blade.php'), 'possible-models' => [], 'possible-events' => [], ], $stub->toArray()); diff --git a/tests/Presets/LaravelPresetTest.php b/tests/Presets/LaravelPresetTest.php index 0ce376b..6bad39b 100644 --- a/tests/Presets/LaravelPresetTest.php +++ b/tests/Presets/LaravelPresetTest.php @@ -9,6 +9,8 @@ use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\Test; +use function Illuminate\Filesystem\join_paths; + class LaravelPresetTest extends TestCase { use WithWorkbench; @@ -21,13 +23,13 @@ protected function setUp(): void $filesystem = new Filesystem(); $this->afterApplicationCreated(static function () use ($filesystem) { - $filesystem->ensureDirectoryExists(base_path('app/Events')); - $filesystem->ensureDirectoryExists(base_path('app/Models')); + $filesystem->ensureDirectoryExists(join_paths(base_path('app'), 'Events')); + $filesystem->ensureDirectoryExists(join_paths(base_path('app'), 'Models')); }); $this->beforeApplicationDestroyed(static function () use ($filesystem) { - $filesystem->deleteDirectory(base_path('app/Events')); - $filesystem->deleteDirectory(base_path('app/Models')); + $filesystem->deleteDirectory(join_paths(base_path('app'), 'Events')); + $filesystem->deleteDirectory(join_paths(base_path('app'), 'Models')); }); parent::setUp();