From b0a4bd215117c5dd9d130a6f44ca88cf0f3819d6 Mon Sep 17 00:00:00 2001 From: Witel Group Date: Sun, 18 Aug 2024 10:49:26 +0000 Subject: [PATCH] change the test case to adopt two path of migrations --- tests/TestCase.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/TestCase.php b/tests/TestCase.php index 98e3bade..d97bcbfa 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -8,4 +8,16 @@ use Illuminate\Foundation\Testing\WithFaker; abstract class TestCase extends BaseTestCase { use CreatesApplication, WithFaker; + + public function artisan($command, $parameters = []) + { + $migrate = explode(':', $command); + + + if ($migrate[0] == "migrate" && !isset($parameters['--path'])) { + $parameters['--path'] = ['/database/old_migrations/', 'database/migrations']; + } + + return parent::artisan($command, $parameters); + } }