diff --git a/tests/Command/ConfigTest.php b/tests/Command/ConfigTest.php index bf782b1..7bef034 100644 --- a/tests/Command/ConfigTest.php +++ b/tests/Command/ConfigTest.php @@ -20,6 +20,8 @@ $this->cleanSlate(); file_put_contents(base_path('composer.json'), $this->originalComposerContents); + + $this->artisan('optimize:clear')->assertSuccessful()->execute(); }); it('can run the config wizard', function () { diff --git a/tests/Command/OptimizeTest.php b/tests/Command/OptimizeTest.php index 653dca9..6391e95 100644 --- a/tests/Command/OptimizeTest.php +++ b/tests/Command/OptimizeTest.php @@ -12,12 +12,18 @@ DomainCache::clear(); $this->originalComposerContents = file_get_contents(base_path('composer.json')); + + $this->artisan('clear-compiled')->assertSuccessful()->execute(); + $this->artisan('optimize:clear')->assertSuccessful()->execute(); }); afterEach(function () { DomainCache::clear(); file_put_contents(base_path('composer.json'), $this->originalComposerContents); + + $this->artisan('clear-compiled')->assertSuccessful()->execute(); + $this->artisan('optimize:clear')->assertSuccessful()->execute(); }); it('can optimize discovered domain providers, commands, migrations', function () { diff --git a/tests/TestCase.php b/tests/TestCase.php index 25ea735..54f6f89 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -46,6 +46,9 @@ protected function setUp(): void protected function tearDown(): void { + $this->artisan('clear-compiled')->assertSuccessful()->execute(); + $this->artisan('optimize:clear')->assertSuccessful()->execute(); + $basePath = $this->getBasePath(); $this->cleanSlate();