Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
118 lines (101 loc) · 3.44 KB

File metadata and controls

118 lines (101 loc) · 3.44 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Feature: Skipping plugins
Scenario: Skipping plugins via global flag
Given a WP installation
And I run `wp plugin activate hello akismet`
When I run `wp eval 'var_export( defined("AKISMET_VERSION") );var_export( function_exists( "hello_dolly" ) );'`
Then STDOUT should be:
"""
truetrue
"""
# The specified plugin should be skipped
When I run `wp --skip-plugins=akismet eval 'var_export( defined("AKISMET_VERSION") );'`
Then STDOUT should be:
"""
false
"""
# The specified plugin should still show up as an active plugin
When I run `wp --skip-plugins=akismet plugin status akismet`
Then STDOUT should contain:
"""
Status: Active
"""
# The un-specified plugin should continue to be loaded
When I run `wp --skip-plugins=akismet eval 'var_export( defined("AKISMET_VERSION") );var_export( function_exists( "hello_dolly" ) );'`
Then STDOUT should be:
"""
falsetrue
"""
# Can specify multiple plugins to skip
When I try `wp eval --skip-plugins=hello,akismet 'echo hello_dolly();'`
Then STDERR should contain:
"""
Call to undefined function hello_dolly()
"""
And the return code should be 255
# No plugins should be loaded when --skip-plugins doesn't have a value
When I run `wp --skip-plugins eval 'var_export( defined("AKISMET_VERSION") );var_export( function_exists( "hello_dolly" ) );'`
Then STDOUT should be:
"""
falsefalse
"""
Scenario: Skipping multiple plugins via config file
Given a WP installation
And a wp-cli.yml file:
"""
skip-plugins:
- hello
- akismet
"""
When I run `wp plugin activate hello`
And I try `wp eval 'echo hello_dolly();'`
Then STDERR should contain:
"""
Call to undefined function hello_dolly()
"""
And the return code should be 255
Scenario: Skipping all plugins via config file
Given a WP installation
And a wp-cli.yml file:
"""
skip-plugins: true
"""
When I run `wp plugin activate hello`
And I try `wp eval 'echo hello_dolly();'`
Then STDERR should contain:
"""
Call to undefined function hello_dolly()
"""
And the return code should be 255
Scenario: Skip network active plugins
Given a WP multisite installation
When I successfully try `wp plugin deactivate akismet hello`
Then STDERR should be:
"""
Warning: Plugin 'akismet' isn't active.
Warning: Plugin 'hello' isn't active.
"""
And STDOUT should be:
"""
Success: Plugins already deactivated.
"""
When I run `wp plugin activate --network akismet hello`
And I run `wp eval 'var_export( defined("AKISMET_VERSION") );var_export( function_exists( "hello_dolly" ) );'`
Then STDOUT should be:
"""
truetrue
"""
When I run `wp --skip-plugins eval 'var_export( defined("AKISMET_VERSION") );var_export( function_exists( "hello_dolly" ) );'`
Then STDOUT should be:
"""
falsefalse
"""
When I run `wp --skip-plugins=akismet eval 'var_export( defined("AKISMET_VERSION") );var_export( function_exists( "hello_dolly" ) );'`
Then STDOUT should be:
"""
falsetrue
"""
When I run `wp --skip-plugins=hello eval 'var_export( defined("AKISMET_VERSION") );var_export( function_exists( "hello_dolly" ) );'`
Then STDOUT should be:
"""
truefalse
"""
Morty Proxy This is a proxified and sanitized view of the page, visit original site.