We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0050e8 commit df298bcCopy full SHA for df298bc
1 file changed
tests/src/TestCase.php
@@ -9,6 +9,7 @@
9
*/
10
namespace SebastianBergmann\CodeCoverage;
11
12
+use function is_dir;
13
use function rmdir;
14
use function unlink;
15
use BankAccount;
@@ -1946,8 +1947,14 @@ protected function setUpXdebugStubForClassWithOutsideFunction(): Driver
1946
1947
1948
protected function removeTemporaryFiles(): void
1949
{
1950
+ $tmpPath = TEST_FILES_PATH . 'tmp';
1951
+
1952
+ if (!is_dir($tmpPath)) {
1953
+ return;
1954
+ }
1955
1956
$tmpFilesIterator = new RecursiveIteratorIterator(
- new RecursiveDirectoryIterator(TEST_FILES_PATH . 'tmp', RecursiveDirectoryIterator::SKIP_DOTS),
1957
+ new RecursiveDirectoryIterator($tmpPath, RecursiveDirectoryIterator::SKIP_DOTS),
1958
RecursiveIteratorIterator::CHILD_FIRST,
1959
);
1960
0 commit comments