We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c225e63 commit 7978523Copy full SHA for 7978523
tests/ProgramSaverTest.php
@@ -27,8 +27,10 @@ final class ProgramSaverTest extends TestCase
27
protected function setUp(): void
28
{
29
parent::setUp();
30
- $this->tempDir = sys_get_temp_dir() . '/program_saver_test_' . uniqid();
31
- mkdir($this->tempDir, 0755, true);
+ $this->tempDir = sys_get_temp_dir() . '/program_saver_test_' . bin2hex(random_bytes(8));
+ if (!mkdir($this->tempDir, 0755, true) && !is_dir($this->tempDir)) {
32
+ $this->fail('Failed to create temp dir: ' . $this->tempDir);
33
+ }
34
}
35
36
/**
0 commit comments