Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 18, 2024
1 parent 07ab68f commit afb0b69
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/Command/OptimizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,22 @@
});

describe('laravel optimize', function () {
beforeEach(function () {
$this->artisan('clear-compiled')->assertSuccessful()->execute();
$this->artisan('optimize:clear')->assertSuccessful()->execute();
});

afterEach(function () {
$this->artisan('clear-compiled')->assertSuccessful()->execute();
$this->artisan('optimize:clear')->assertSuccessful()->execute();
$this->reloadApplication();
});

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();

$this->reloadApplication();

$this->artisan('optimize')->assertSuccessful()->execute();

expect(DomainCache::get('domain-providers'))->not->toBeNull();
Expand All @@ -117,8 +126,6 @@
expect(DomainCache::get('domain-commands'))->not->toBeNull();
expect(DomainCache::get('domain-migration-paths'))->not->toBeNull();

$this->reloadApplication();

$this->artisan('optimize:clear')->assertSuccessful()->execute();

expect(DomainCache::get('domain-providers'))->toBeNull();
Expand Down

0 comments on commit afb0b69

Please sign in to comment.