From f30bd3d65f417a41d989b30d08375cd5344d426d Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Sat, 16 Nov 2024 23:47:41 -0500 Subject: [PATCH] Assert config values --- tests/Autoload/IgnoreTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/Autoload/IgnoreTest.php b/tests/Autoload/IgnoreTest.php index 15bf1ed..93490e4 100644 --- a/tests/Autoload/IgnoreTest.php +++ b/tests/Autoload/IgnoreTest.php @@ -43,6 +43,12 @@ }); it('can ignore folders when autoloading', function () { + expect(config('ddd.domain_path'))->toEqual('src/Domain'); + expect(config('ddd.domain_namespace'))->toEqual('Domain'); + expect(config('ddd.application_path'))->toEqual('src/Application'); + expect(config('ddd.application_namespace'))->toEqual('Application'); + expect(config('ddd.layers'))->toContain('src/Infrastructure'); + $expected = [ ...array_values($this->providers), ...array_values($this->commands), @@ -53,7 +59,8 @@ ...DDD::autoloader()->discoverCommands(), ]; - expect($discovered)->toEqualCanonicalizing($expected); + expect($expected)->each(fn ($item) => $item->toBeIn($discovered)); + expect($discovered)->toHaveCount(count($expected)); Config::set('ddd.autoload_ignore', ['Commands']);