From fb79601e31bc59ce766d14839a64b08214f68929 Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Sat, 16 Nov 2024 20:37:34 -0500 Subject: [PATCH] Normalize hooks to use ddd:clear --- tests/Autoload/CommandTest.php | 4 +++- tests/Autoload/FactoryTest.php | 4 +++- tests/Autoload/PolicyTest.php | 4 +++- tests/Autoload/ProviderTest.php | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/Autoload/CommandTest.php b/tests/Autoload/CommandTest.php index a0cc1a4..a8962fd 100644 --- a/tests/Autoload/CommandTest.php +++ b/tests/Autoload/CommandTest.php @@ -16,11 +16,13 @@ $this->setupTestApplication(); - Artisan::call('optimize:clear'); + DomainCache::clear(); + Artisan::call('ddd:clear'); }); afterEach(function () { DomainCache::clear(); + Artisan::call('ddd:clear'); }); describe('when ddd.autoload.commands = false', function () { diff --git a/tests/Autoload/FactoryTest.php b/tests/Autoload/FactoryTest.php index 6b76d17..dc8e822 100644 --- a/tests/Autoload/FactoryTest.php +++ b/tests/Autoload/FactoryTest.php @@ -10,11 +10,13 @@ beforeEach(function () { $this->setupTestApplication(); - Artisan::call('optimize:clear'); + DomainCache::clear(); + Artisan::call('ddd:clear'); }); afterEach(function () { DomainCache::clear(); + Artisan::call('ddd:clear'); }); describe('when ddd.autoload.factories = true', function () { diff --git a/tests/Autoload/PolicyTest.php b/tests/Autoload/PolicyTest.php index 1ee2855..3b11b25 100644 --- a/tests/Autoload/PolicyTest.php +++ b/tests/Autoload/PolicyTest.php @@ -17,11 +17,13 @@ $this->setupTestApplication(); - Artisan::call('optimize:clear'); + DomainCache::clear(); + Artisan::call('ddd:clear'); }); afterEach(function () { DomainCache::clear(); + Artisan::call('ddd:clear'); }); describe('when ddd.autoload.policies = false', function () { diff --git a/tests/Autoload/ProviderTest.php b/tests/Autoload/ProviderTest.php index 99e0104..4da3952 100644 --- a/tests/Autoload/ProviderTest.php +++ b/tests/Autoload/ProviderTest.php @@ -16,11 +16,13 @@ $this->setupTestApplication(); - Artisan::call('optimize:clear'); + DomainCache::clear(); + Artisan::call('ddd:clear'); }); afterEach(function () { DomainCache::clear(); + Artisan::call('ddd:clear'); }); describe('when ddd.autoload.providers = false', function () {