Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Oct 14, 2024
1 parent 7aa2801 commit af25cf9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Command/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

use Illuminate\Support\Facades\Artisan;
use Lunarstorm\LaravelDDD\Support\DomainCache;
use Lunarstorm\LaravelDDD\Support\Path;

beforeEach(function () {
$this->setupTestApplication();
DomainCache::clear();
});

it('can cache discovered domain providers and commands', function () {
it('can cache discovered domain providers, commands, migrations', function () {
expect(DomainCache::get('domain-providers'))->toBeNull();
expect(DomainCache::get('domain-commands'))->toBeNull();
expect(DomainCache::get('domain-migration-paths'))->toBeNull();
Expand All @@ -28,8 +27,9 @@
expect(DomainCache::get('domain-commands'))
->toContain('Domain\Invoicing\Commands\InvoiceDeliver');

expect(DomainCache::get('domain-migration-paths'))
->toContain(base_path(Path::normalize('src/Domain/Invoicing/Database/Migrations')));
$paths = collect(DomainCache::get('domain-migration-paths'))->join("\n");

expect($paths)->toContainFilepath('src/Domain/Invoicing/Database/Migrations');
});

it('can clear the cache', function () {
Expand Down

0 comments on commit af25cf9

Please sign in to comment.