Skip to content

Commit

Permalink
Try creating mock command
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperTey committed Nov 18, 2024
1 parent 69eebea commit 66db9ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Contracts\Config\Repository;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\File;
use Lunarstorm\LaravelDDD\LaravelDDDServiceProvider;
use Lunarstorm\LaravelDDD\Support\DomainCache;
Expand Down Expand Up @@ -33,6 +34,12 @@ protected function setUp(): void
DomainCache::clear();

config()->set('data.structure_caching.enabled', false);

Artisan::command('data:cache-structures', function () {
// do nothing
dd('do nothing');

});
});

$this->afterApplicationRefreshed(function () {
Expand All @@ -44,8 +51,6 @@ protected function setUp(): void
});

parent::setUp();

config()->set('data.structure_caching.enabled', false);
}

protected function tearDown(): void
Expand Down

0 comments on commit 66db9ca

Please sign in to comment.