Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperTey committed Nov 18, 2024
1 parent 60e93a4 commit cdf0b95
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/Command/OptimizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit cdf0b95

Please sign in to comment.