Skip to content

Commit 9cfe53b

Browse files
Copilotschlessera
andauthored
Add remote zip install failure-path coverage
Co-authored-by: schlessera <83631+schlessera@users.noreply.github.com>
1 parent d1a10fa commit 9cfe53b

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎features/package-install.feature‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,21 @@ Feature: Install WP-CLI packages
10361036
And STDERR should be empty
10371037
And STDOUT should be empty
10381038
1039+
Scenario: Install from a remote zip URL with invalid zip contents
1040+
Given an empty directory
1041+
And an invalid.zip file:
1042+
"""
1043+
this is not a zip archive
1044+
"""
1045+
And a PHP built-in web server
1046+
1047+
When I try `wp package install http://localhost:8080/invalid.zip`
1048+
Then the return code should be 1
1049+
And STDERR should contain:
1050+
"""
1051+
ZipArchive failed to unzip
1052+
"""
1053+
10391054
@github-api
10401055
Scenario: Install a package from Git using a shortened mixed-case package identifier but lowercase composer.json name
10411056
Given an empty directory

0 commit comments

Comments
 (0)