From c5750bb09f70779c3fd1a8d8e25a82ec881b9bc2 Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Sat, 9 Nov 2024 13:53:33 -0500 Subject: [PATCH] Attempt composer reload after generator called. --- tests/Factory/DomainFactoryTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Factory/DomainFactoryTest.php b/tests/Factory/DomainFactoryTest.php index c7604ef..86050d1 100644 --- a/tests/Factory/DomainFactoryTest.php +++ b/tests/Factory/DomainFactoryTest.php @@ -28,10 +28,12 @@ it('can instantiate a domain model factory', function ($domainParameter, $modelName, $modelClass) { $this->setupTestApplication(); - $this->composerReload(); Config::set('ddd.base_model', 'Lunarstorm\LaravelDDD\Models\DomainModel'); Artisan::call("ddd:model -f {$domainParameter}:{$modelName}"); + + $this->composerReload(); + expect(class_exists($modelClass))->toBeTrue(); expect($modelClass::factory())->toBeInstanceOf(Factory::class); })->with([