Skip to content

Commit 383bc77

Browse files
committed
Force a clean testing environment
1 parent 99b31cb commit 383bc77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/AsyncTaskTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public function testAsyncBasic()
8282
{
8383
// tests that we can dispatch async tasks to the cli artisan
8484
$testFileName = $this->getStoragePath("testAsyncBasic.txt");
85+
@unlink($testFileName);
8586
$message = "Hello world!";
8687
$task = new AsyncTask(function () use ($testFileName, $message) {
8788
$fp = fopen($testFileName, "w");
@@ -139,6 +140,7 @@ public function testAsyncTimeout()
139140
$message = "timeout occured";
140141
$textFilePath = $this->getStoragePath("testAsyncTimeout.txt");
141142
$timeoutTask = new TestTimeoutNormalTask($message, $textFilePath);
143+
@unlink($textFilePath);
142144
$task = new AsyncTask($timeoutTask);
143145
$task->withTimeLimit(1)->start();
144146
// we wait for it to timeout

0 commit comments

Comments
 (0)