diff --git a/src/PendingCalls/UsesCall.php b/src/PendingCalls/UsesCall.php index 8dfd9289..00267afb 100644 --- a/src/PendingCalls/UsesCall.php +++ b/src/PendingCalls/UsesCall.php @@ -84,7 +84,7 @@ final class UsesCall }, $targets); $this->targets = array_reduce($targets, function (array $accumulator, string $target): array { - if ($matches = glob($target)) { + if (($matches = glob($target)) != false) { foreach ($matches as $file) { $accumulator[] = (string) realpath($file); } diff --git a/tests/PHPUnit/CustomTestCase/UsesPerDirectoryAsPattern.php b/tests/PHPUnit/CustomTestCase/SubFolder/InnerFolder/UsesPerDirectoryAsPattern.php similarity index 60% rename from tests/PHPUnit/CustomTestCase/UsesPerDirectoryAsPattern.php rename to tests/PHPUnit/CustomTestCase/SubFolder/InnerFolder/UsesPerDirectoryAsPattern.php index 5e8546f4..196fea3a 100644 --- a/tests/PHPUnit/CustomTestCase/UsesPerDirectoryAsPattern.php +++ b/tests/PHPUnit/CustomTestCase/SubFolder/InnerFolder/UsesPerDirectoryAsPattern.php @@ -1,7 +1,5 @@ in('../*/'); - test('closure was bound to CustomTestCase', function () { $this->assertCustomTrue(); }); diff --git a/tests/PHPUnit/CustomTestCase/UsesPerFileAsPattern.php b/tests/PHPUnit/CustomTestCase/SubFolder2/UsesPerFileAsPattern.php similarity index 60% rename from tests/PHPUnit/CustomTestCase/UsesPerFileAsPattern.php rename to tests/PHPUnit/CustomTestCase/SubFolder2/UsesPerFileAsPattern.php index fb47d2d4..196fea3a 100644 --- a/tests/PHPUnit/CustomTestCase/UsesPerFileAsPattern.php +++ b/tests/PHPUnit/CustomTestCase/SubFolder2/UsesPerFileAsPattern.php @@ -1,7 +1,5 @@ in('*.php'); - test('closure was bound to CustomTestCase', function () { $this->assertCustomTrue(); }); diff --git a/tests/Pest.php b/tests/Pest.php index 23daca74..80f3fc7b 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,9 +1,14 @@ in('PHPUnit/CustomTestCaseInSubFolders/SubFolder/SubFolder'); +uses(CustomTestCase::class)->in('PHPUnit/CustomTestCase/SubFolder/*/'); + +uses(CustomTestCase::class)->in('PHPUnit/CustomTestCase/SubFolder2/*AsPattern.php'); + uses()->group('integration')->in('Visual'); // NOTE: global test value container to be mutated and checked across files, as needed