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 d92bd28 commit 8f1f881Copy full SHA for 8f1f881
src/TestCase.php
@@ -46,14 +46,16 @@ protected function setUp(): void
46
DIRECTORY_SEPARATOR;
47
;
48
49
- \mkdir($this->tmpDir, 0777, true);
50
$this->tmpNamespace = \uniqid('PACTN');
51
}
52
53
protected function tearDown(): void
54
{
55
parent::tearDown();
56
- $this->rmdir($this->baseTmpDir);
+
+ if (\file_exists($this->baseTmpDir)) {
57
+ $this->rmdir($this->baseTmpDir);
58
+ }
59
60
61
/**
@@ -110,6 +112,10 @@ protected function rmdir(string $dir): void
110
112
*/
111
113
protected function getTmpDir(): string
114
115
+ if (!\file_exists($this->tmpDir)) {
116
+ \mkdir($this->tmpDir, 0777, true);
117
118
119
return $this->tmpDir;
120
121
0 commit comments