Skip to content

Commit 24f7abf

Browse files
committed
Remove temp directory even if some other test created it
1 parent 9e84835 commit 24f7abf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/BaseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public function getTemporaryFile(string $filename, string $content = null): stri
4444

4545
public function tearDown(): void
4646
{
47-
if ($this->tempDirectory) {
48-
(new Filesystem())->remove($this->tempDirectory);
47+
if (file_exists(System::tempDir($this->getName()))) {
48+
(new Filesystem())->remove(System::tempDir($this->getName()));
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)