From 66db9ca9a6d893ca7e590bd203f0925e47181119 Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Sun, 17 Nov 2024 21:02:12 -0500 Subject: [PATCH] Try creating mock command --- tests/TestCase.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index ef67324..77ea059 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -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; @@ -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 () { @@ -44,8 +51,6 @@ protected function setUp(): void }); parent::setUp(); - - config()->set('data.structure_caching.enabled', false); } protected function tearDown(): void