Skip to content

Commit

Permalink
Added simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
Admiral-Enigma committed Aug 22, 2022
1 parent 507cc74 commit 09eaa3e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/TemporaryDirectoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 09eaa3e

Please sign in to comment.