Skip to content

Commit

Permalink
Added test case for ZipArchive
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Jan 15, 2022
1 parent 1535e21 commit 1435060
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/ZipArchive/ZipArchiveAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
use League\Flysystem\UnableToWriteFile;
use League\Flysystem\Visibility;

use function iterator_to_array;

/**
* @group zip
*/
Expand Down Expand Up @@ -227,6 +229,20 @@ public function failing_to_set_visibility_because_the_file_does_not_exist(): voi
$this->adapter()->setVisibility('path.txt', Visibility::PUBLIC);
}

/**
* @test
*/
public function deleting_a_directory_with_files_in_it(): void
{
$this->givenWeHaveAnExistingFile('nested/path-a.txt');
$this->givenWeHaveAnExistingFile('nested/path-b.txt');

$this->adapter()->deleteDirectory('nested');
$listing = iterator_to_array($this->adapter()->listContents('', true));

self::assertEquals([], $listing);
}

/**
* @test
*/
Expand Down

0 comments on commit 1435060

Please sign in to comment.