Skip to content

Commit

Permalink
Assert the counts too
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 17, 2024
1 parent 0add0d1 commit 93c617b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Autoload/IgnoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand All @@ -79,6 +80,7 @@
...DDD::autoloader()->discoverCommands(),
];

expect($discovered)->toHaveCount(count($expected));
expect($discovered)->each(fn ($item) => $item->toBeIn($expected));
});

Expand All @@ -93,6 +95,7 @@
...DDD::autoloader()->discoverCommands(),
];

expect($discovered)->toHaveCount(count($expected));
expect($discovered)->each(fn ($item) => $item->toBeIn($expected));

$secret = null;
Expand All @@ -119,7 +122,7 @@
...DDD::autoloader()->discoverCommands(),
];

expect($discovered)->toEqual([]);
expect($discovered)->toHaveCount(0);

expect($secret)->toEqual('i-was-invoked');
});

0 comments on commit 93c617b

Please sign in to comment.