diff --git a/phpunit.xml b/phpunit.xml index d562be80..61b6b64b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ ./app + + + diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php new file mode 100644 index 00000000..5fa7829c --- /dev/null +++ b/tests/Bootstrap.php @@ -0,0 +1,42 @@ +createApplication()->make(Kernel::class); + + $commands = [ + 'config:cache', + 'event:cache', + ]; + + foreach ($commands as $command) { + $console->call($command); + } + } + + public function executeAfterLastTest(): void + { + array_map('unlink', glob('bootstrap/cache/*.phpunit.php')); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 943a2898..00000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,33 +0,0 @@ -make(Kernel::class))->bootstrap(); - -foreach ($commands as $command) { - $console->call($command); -}