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 38dca53 commit 0b83ea7Copy full SHA for 0b83ea7
tests/bootstrap.php
@@ -15,9 +15,12 @@
15
16
17
// create temporary directory
18
-define('TEMP_DIR', __DIR__ . '/tmp/' . getmypid());
19
-@mkdir(dirname(TEMP_DIR)); // @ - directory may already exist
20
-Tester\Helpers::purge(TEMP_DIR);
+define('TEMP_DIR', __DIR__ . '/tmp/' . lcg_value());
+@mkdir(TEMP_DIR, 0777, TRUE); // @ - base directory may already exist
+register_shutdown_function(function () {
21
+ Tester\Helpers::purge(TEMP_DIR);
22
+ rmdir(TEMP_DIR);
23
+});
24
25
26
function test(\Closure $function)
0 commit comments