@@ -92,10 +92,10 @@ Feature: Install WordPress plugins
9292 define( 'WP_PROXY_PORT', '443' );
9393 """
9494
95- When I try `wp --require=invalid-proxy-details.php plugin install edit-flow `
95+ When I try `wp --require=invalid-proxy-details.php plugin install debug-bar `
9696 Then STDERR should contain:
9797 """
98- Warning: edit-flow : An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.
98+ Warning: debug-bar : An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.
9999 """
100100 And STDERR should contain:
101101 """
@@ -104,7 +104,7 @@ Feature: Install WordPress plugins
104104 And STDOUT should be empty
105105 And the return code should be 1
106106
107- When I run `wp plugin install edit-flow `
107+ When I run `wp plugin install debug-bar `
108108 Then STDOUT should contain:
109109 """
110110 Plugin installed successfully.
@@ -171,7 +171,7 @@ Feature: Install WordPress plugins
171171 When I run `rm wp-content/plugins/akismet/akismet.php`
172172 Then the return code should be 0
173173
174- When I try `wp plugin install akismet`
174+ When I try `wp plugin install akismet --ignore-requirements `
175175 Then STDERR should contain:
176176 """
177177 Warning: Destination folder already exists. "{WORKING_DIR}/wp-content/plugins/akismet/"
@@ -237,3 +237,36 @@ Feature: Install WordPress plugins
237237 Plugin 'site-secrets' activated.
238238 Success: Plugin already installed.
239239 """
240+
241+ @require-php-7
242+ Scenario : Can't install plugin that requires a newer version of WordPress
243+ Given a WP install
244+
245+ When I run `wp core download --version=6.4 --force`
246+ And I run `rm -r wp-content/themes/*`
247+
248+ And I try `wp plugin install wp-super-cache`
249+ Then STDERR should contain:
250+ """
251+ Warning: wp-super-cache: This plugin does not work with your version of WordPress
252+ """
253+
254+ And STDERR should contain:
255+ """
256+ Error: No plugins installed.
257+ """
258+
259+ @less-than-php-7.4 @require-wp-6.6
260+ Scenario : Can't install plugin that requires a newer version of PHP
261+ Given a WP install
262+
263+ And I try `wp plugin install contact-form-7`
264+ Then STDERR should contain:
265+ """
266+ Warning: contact-form-7: This plugin does not work with your version of PHP
267+ """
268+
269+ And STDERR should contain:
270+ """
271+ Error: No plugins installed.
272+ """
0 commit comments