Skip to content

Commit d071304

Browse files
committed
Adapt existing test instead
1 parent a8fc615 commit d071304

File tree

1 file changed

+5
-25
lines changed

1 file changed

+5
-25
lines changed

features/plugin-activate.feature

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Feature: Activate WordPress plugins
117117
*/
118118
"""
119119
And I run `wp plugin deactivate --all`
120-
And I run `php -r 'echo PHP_VERSION;'`
120+
And I run `wp cli info | grep "PHP version" | awk '{print $3}'`
121121
And save STDOUT as {PHP_VERSION}
122122

123123
When I try `wp plugin activate high-requirements`
@@ -129,6 +129,10 @@ Feature: Activate WordPress plugins
129129
"""
130130
1 out of 1
131131
"""
132+
And STDOUT should not contain:
133+
"""
134+
Success:
135+
"""
132136

133137
Scenario: Adding --exclude with plugin activate --all should exclude the plugins specified via --exclude
134138
When I try `wp plugin activate --all --exclude=hello`
@@ -148,27 +152,3 @@ Feature: Activate WordPress plugins
148152
Success:
149153
"""
150154
And the return code should be 0
151-
152-
@require-wp-5.1
153-
Scenario: Incompatible plugins cannot be activated
154-
Given a WP installation
155-
And a wp-content/plugins/incompatible-plugin.php file:
156-
"""
157-
<?php
158-
/**
159-
* Plugin Name: Incompatible Plugin
160-
* Requires PHP: 42.0
161-
*/
162-
"""
163-
And I run `wp cli info | grep "PHP version" | awk '{print $3}'`
164-
And save STDOUT as {PHP_VERSION}
165-
166-
When I try `wp plugin activate incompatible-plugin`
167-
Then STDERR should contain:
168-
"""
169-
Failed to activate plugin. Current PHP version ({PHP_VERSION}) does not meet minimum requirements for Incompatible Plugin. The plugin requires PHP 42.0.
170-
"""
171-
And STDOUT should not contain:
172-
"""
173-
Success:
174-
"""

0 commit comments

Comments
 (0)