File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,33 @@ Feature: Check if a WordPress plugin is active
5454 When I try `wp plugin is-active akismet`
5555 Then STDERR should contain:
5656 """
57- Warning: Plugin 'akismet' is in the active_plugins option but the plugin file does not exist.
57+ Warning: Plugin 'akismet' is marked as active but the plugin file does not exist.
58+ """
59+ And the return code should be 1
60+
61+ Scenario : Warn when network-activated plugin is in active_sitewide_plugins but file does not exist
62+ Given a WP multisite install
63+
64+ When I run `wp plugin activate akismet --network`
65+ Then STDOUT should contain:
66+ """
67+ Success:
68+ """
69+
70+ When I run `wp plugin is-active akismet --network`
71+ Then the return code should be 0
72+
73+ # Remove the plugin directory
74+ When I run `wp plugin path akismet --dir`
75+ Then save STDOUT as {PLUGIN_PATH}
76+
77+ When I run `rm -rf {PLUGIN_PATH}`
78+ Then the return code should be 0
79+
80+ # Now the plugin file is gone but still in active_sitewide_plugins
81+ When I try `wp plugin is-active akismet --network`
82+ Then STDERR should contain:
83+ """
84+ Warning: Plugin 'akismet' is marked as active but the plugin file does not exist.
5885 """
5986 And the return code should be 1
You can’t perform that action at this time.
0 commit comments