diff --git a/tests/Command/OptimizeTest.php b/tests/Command/OptimizeTest.php index 862f781..b1e4b5e 100644 --- a/tests/Command/OptimizeTest.php +++ b/tests/Command/OptimizeTest.php @@ -88,20 +88,12 @@ }); describe('laravel optimize', function () { - beforeEach(function () { - $this->artisan('optimize:clear')->assertSuccessful()->execute(); - config()->set('data.structure_caching.enabled', false); - }); - - afterEach(function () { - $this->artisan('optimize:clear')->assertSuccessful()->execute(); - }); - test('optimize will include ddd:optimize', function () { expect(DomainCache::get('domain-providers'))->toBeNull(); expect(DomainCache::get('domain-commands'))->toBeNull(); expect(DomainCache::get('domain-migration-paths'))->toBeNull(); + config()->set('data.structure_caching.enabled', false); $this->artisan('optimize')->assertSuccessful()->execute(); expect(DomainCache::get('domain-providers'))->not->toBeNull(); @@ -112,6 +104,7 @@ }); test('optimize:clear will clear ddd cache', function () { + config()->set('data.structure_caching.enabled', false); $this->artisan('ddd:optimize')->assertSuccessful()->execute(); expect(DomainCache::get('domain-providers'))->not->toBeNull();