diff --git a/tests/TemporaryDirectoryTest.php b/tests/TemporaryDirectoryTest.php index b850792..26fbdbb 100644 --- a/tests/TemporaryDirectoryTest.php +++ b/tests/TemporaryDirectoryTest.php @@ -280,6 +280,19 @@ public function it_should_return_true_on_deleted_file_is_not_existed() $this->assertTrue($temporaryDirectory); } + /** @test */ + public function it_exists_function_should_tell_if_directory_exists() + { + $temporaryDirectory = (new TemporaryDirectory()) + ->name($this->temporaryDirectory); + + $this->assertFalse($temporaryDirectory->exists()); + + $temporaryDirectory->create(); + + $this->assertTrue($temporaryDirectory->exists()); + } + protected function deleteDirectory(string $path): bool { if (is_link($path)) {