Skip to content

Commit 23066fb

Browse files
Copilotschlessera
andauthored
Cover flat-layout remote zip package install
Co-authored-by: schlessera <83631+schlessera@users.noreply.github.com>
1 parent 6ef07c9 commit 23066fb

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎features/package-install.feature‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,34 @@ Feature: Install WP-CLI packages
10451045
And STDERR should be empty
10461046
And STDOUT should be empty
10471047
1048+
Scenario: Install a package from a remote zip URL with files at archive root
1049+
Given an empty directory
1050+
And a composer-flat.json file:
1051+
"""
1052+
{
1053+
"name": "wp-cli-test/remote-zip-flat-command",
1054+
"description": "Dummy flat-layout ZIP package for acceptance tests.",
1055+
"type": "wp-cli-package"
1056+
}
1057+
"""
1058+
And I run `php -r '$zip = new ZipArchive(); $zip->open( "remote-zip-flat-command.zip", ZipArchive::CREATE | ZipArchive::OVERWRITE ); $zip->addFromString( "composer.json", file_get_contents( "composer-flat.json" ) ); $zip->close();'`
1059+
And a PHP built-in web server
1060+
1061+
When I run `wp package install http://localhost:8080/remote-zip-flat-command.zip`
1062+
Then STDOUT should contain:
1063+
"""
1064+
Installing package wp-cli-test/remote-zip-flat-command
1065+
"""
1066+
And STDOUT should contain:
1067+
"""
1068+
Success: Package installed.
1069+
"""
1070+
1071+
When I run `wp package is-installed wp-cli-test/remote-zip-flat-command`
1072+
Then the return code should be 0
1073+
And STDERR should be empty
1074+
And STDOUT should be empty
1075+
10481076
Scenario: Install from a remote zip URL with invalid zip contents
10491077
Given an empty directory
10501078
And an invalid.zip file:

0 commit comments

Comments
 (0)