Skip to content

Commit 3e414be

Browse files
Copilotswissspidy
andauthored
Restore 'Install a package with a dependency' test (#224)
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Pascal Birchler <pascalb@google.com>
1 parent 00df3a4 commit 3e414be

1 file changed

Lines changed: 16 additions & 25 deletions

File tree

features/package-install.feature

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -114,67 +114,58 @@ Feature: Install WP-CLI packages
114114
Version C.
115115
"""
116116

117-
@require-php-5.6 @broken
117+
# The package requires PHP 7.4
118+
@require-php-7.4
118119
Scenario: Install a package with a dependency
119120
Given an empty directory
120121

121-
When I run `wp package install yoast/wp-cli-faker`
122+
When I run `wp package install https://github.com/swissspidy/validate-readme-command.git`
122123
Then STDOUT should contain:
123124
"""
124-
Success: Package installed
125+
Success: Package installed.
125126
"""
126-
And the {PACKAGE_PATH}/vendor/yoast directory should contain:
127+
And the {PACKAGE_PATH}/vendor/swissspidy directory should contain:
127128
"""
128-
wp-cli-faker
129+
validate-readme-command
129130
"""
130-
And the {PACKAGE_PATH}/vendor/fzaninotto directory should contain:
131+
And the {PACKAGE_PATH}/vendor/michelf directory should contain:
131132
"""
132-
faker
133+
php-markdown
133134
"""
134135

135-
When I run `wp package is-installed yoast/wp-cli-faker`
136+
When I run `wp package is-installed swissspidy/validate-readme-command`
136137
Then the return code should be 0
137138
And STDERR should be empty
138139
And STDOUT should be empty
139140

140141
When I run `wp package list --fields=name`
141142
Then STDOUT should be a table containing rows:
142-
| name |
143-
| yoast/wp-cli-faker |
143+
| name |
144+
| swissspidy/validate-readme-command |
144145
And STDOUT should not contain:
145146
"""
146-
fzaninotto/faker
147+
michelf
147148
"""
148149

149-
When I run `wp package uninstall yoast/wp-cli-faker`
150+
When I run `wp package uninstall swissspidy/validate-readme-command`
150151
Then STDOUT should contain:
151152
"""
152-
Removing require statement for package 'yoast/wp-cli-faker' from
153+
Removing require statement for package 'swissspidy/validate-readme-command' from
153154
"""
154155
And STDOUT should contain:
155156
"""
156157
Success: Uninstalled package.
157158
"""
158159
And the {PACKAGE_PATH}/vendor directory should not contain:
159160
"""
160-
yoast
161-
"""
162-
And the {PACKAGE_PATH}/vendor directory should not contain:
163-
"""
164-
fzaninotto
161+
swissspidy
165162
"""
166163

167-
When I try `wp package is-installed yoast/wp-cli-faker`
164+
When I try `wp package is-installed swissspidy/validate-readme-command`
168165
Then the return code should be 1
169166
And STDERR should be empty
170167
And STDOUT should be empty
171168

172-
When I run `wp package list`
173-
Then STDOUT should not contain:
174-
"""
175-
trendwerk/faker
176-
"""
177-
178169
@github-api
179170
Scenario: Install a package from a Git URL
180171
Given an empty directory

0 commit comments

Comments
 (0)