From 2f6a3b55deaa471e4fcf7b424f039bf5a0ddcaee Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Sat, 16 Nov 2024 23:41:03 -0500 Subject: [PATCH] wip --- tests/Autoload/CommandTest.php | 4 ++-- tests/Autoload/IgnoreTest.php | 6 +++--- tests/Autoload/ProviderTest.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Autoload/CommandTest.php b/tests/Autoload/CommandTest.php index c6845c6..c63cf25 100644 --- a/tests/Autoload/CommandTest.php +++ b/tests/Autoload/CommandTest.php @@ -46,8 +46,8 @@ $expected = array_values($this->commands); $registered = array_values($mock->getRegisteredCommands()); + expect($expected)->each(fn ($item) => $item->toBeIn($registered)); expect($registered)->toHaveCount(count($expected)); - expect($registered)->each(fn ($item) => $item->toBeIn($expected)); }); }); @@ -75,7 +75,7 @@ $expected = array_values($this->commands); $registered = array_values($mock->getRegisteredCommands()); + expect($expected)->each(fn ($item) => $item->toBeIn($registered)); expect($registered)->toHaveCount(count($expected)); - expect($registered)->each(fn ($item) => $item->toBeIn($expected)); }); }); diff --git a/tests/Autoload/IgnoreTest.php b/tests/Autoload/IgnoreTest.php index 1327a67..15bf1ed 100644 --- a/tests/Autoload/IgnoreTest.php +++ b/tests/Autoload/IgnoreTest.php @@ -66,8 +66,8 @@ ...DDD::autoloader()->discoverCommands(), ]; + expect($expected)->each(fn ($item) => $item->toBeIn($discovered)); expect($discovered)->toHaveCount(count($expected)); - expect($discovered)->each(fn ($item) => $item->toBeIn($expected)); Config::set('ddd.autoload_ignore', ['Providers']); @@ -80,8 +80,8 @@ ...DDD::autoloader()->discoverCommands(), ]; + expect($expected)->each(fn ($item) => $item->toBeIn($discovered)); expect($discovered)->toHaveCount(count($expected)); - expect($discovered)->each(fn ($item) => $item->toBeIn($expected)); }); it('can register a custom autoload filter', function () { @@ -95,8 +95,8 @@ ...DDD::autoloader()->discoverCommands(), ]; + expect($expected)->each(fn ($item) => $item->toBeIn($discovered)); expect($discovered)->toHaveCount(count($expected)); - expect($discovered)->each(fn ($item) => $item->toBeIn($expected)); $secret = null; diff --git a/tests/Autoload/ProviderTest.php b/tests/Autoload/ProviderTest.php index 6ae82ad..d0ecc86 100644 --- a/tests/Autoload/ProviderTest.php +++ b/tests/Autoload/ProviderTest.php @@ -61,8 +61,8 @@ $expected = array_values($this->providers); $registered = array_values($mock->getRegisteredProviders()); + expect($expected)->each(fn ($item) => $item->toBeIn($registered)); expect($registered)->toHaveCount(count($expected)); - expect($registered)->each(fn ($item) => $item->toBeIn($expected)); }); }); @@ -90,7 +90,7 @@ $expected = array_values($this->providers); $registered = array_values($mock->getRegisteredProviders()); + expect($expected)->each(fn ($item) => $item->toBeIn($registered)); expect($registered)->toHaveCount(count($expected)); - expect($registered)->each(fn ($item) => $item->toBeIn($expected)); }); });