From 93c617b0998a599e5b707683b56468e3b83dbd29 Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Sat, 16 Nov 2024 22:56:10 -0500 Subject: [PATCH] Assert the counts too --- tests/Autoload/IgnoreTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Autoload/IgnoreTest.php b/tests/Autoload/IgnoreTest.php index 266f704..1327a67 100644 --- a/tests/Autoload/IgnoreTest.php +++ b/tests/Autoload/IgnoreTest.php @@ -66,6 +66,7 @@ ...DDD::autoloader()->discoverCommands(), ]; + expect($discovered)->toHaveCount(count($expected)); expect($discovered)->each(fn ($item) => $item->toBeIn($expected)); Config::set('ddd.autoload_ignore', ['Providers']); @@ -79,6 +80,7 @@ ...DDD::autoloader()->discoverCommands(), ]; + expect($discovered)->toHaveCount(count($expected)); expect($discovered)->each(fn ($item) => $item->toBeIn($expected)); }); @@ -93,6 +95,7 @@ ...DDD::autoloader()->discoverCommands(), ]; + expect($discovered)->toHaveCount(count($expected)); expect($discovered)->each(fn ($item) => $item->toBeIn($expected)); $secret = null; @@ -119,7 +122,7 @@ ...DDD::autoloader()->discoverCommands(), ]; - expect($discovered)->toEqual([]); + expect($discovered)->toHaveCount(0); expect($secret)->toEqual('i-was-invoked'); });