diff --git a/tests/Pest.php b/tests/Pest.php index 3181e41a..ba34ee1e 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -2,16 +2,16 @@ use Stancl\Tenancy\Tests\TestCase; -uses(TestCase::class)->in(...filesAndFolder()); +uses(TestCase::class)->in(...filesAndFoldersExcluding(['WithoutTenancy'])); function pest(): \Orchestra\Testbench\TestCase { return Pest\TestSuite::getInstance()->test; } -function filesAndFolder(): array +function filesAndFoldersExcluding(array $exclude = []): array { $dirs = scandir(__DIR__); - return array_filter($dirs, fn($dir) => ! in_array($dir, ['.', '..', 'WithoutTenancy'], true)); + return array_filter($dirs, fn($dir) => ! in_array($dir, array_merge(['.', '..'], $exclude) , true)); }