Skip to content

Commit 962ff48

Browse files
committed
Fixed failing test
1 parent 678843c commit 962ff48

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/WatcherTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@
44

55
use PHPUnit\Framework\TestCase;
66
use RTC\Watcher\Watching\EventInfo;
7+
use Swoole\Timer;
78
use function Co\run;
89

910
class WatcherTest extends TestCase
1011
{
12+
protected function setUp(): void
13+
{
14+
parent::setUp();
15+
16+
if (!file_exists(__DIR__ . '/bait')) {
17+
mkdir(__DIR__ . '/bait');
18+
}
19+
}
20+
1121
public function testFileAndDirectoryCreation(): void
1222
{
1323
run(function () {
@@ -152,7 +162,6 @@ public function testCreateChangeDeleteOnTheFly(): void
152162
touch($baitFile);
153163
file_put_contents($baitFile, uniqid());
154164
unlink($baitFile);
155-
rmdir($baitDir);
156165
});
157166
}
158167
}

0 commit comments

Comments
 (0)