diff --git a/src/ZipArchive/ZipArchiveAdapterTest.php b/src/ZipArchive/ZipArchiveAdapterTest.php index 2dafd550a..7bbd5c550 100644 --- a/src/ZipArchive/ZipArchiveAdapterTest.php +++ b/src/ZipArchive/ZipArchiveAdapterTest.php @@ -17,6 +17,8 @@ use League\Flysystem\UnableToWriteFile; use League\Flysystem\Visibility; +use function iterator_to_array; + /** * @group zip */ @@ -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 */