-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathmanage-cache.feature
More file actions
51 lines (42 loc) · 1.34 KB
/
Copy pathmanage-cache.feature
File metadata and controls
51 lines (42 loc) · 1.34 KB
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
Feature: Generate cache
Scenario: Manage wp-super-cache via CLI
Given a WP install
When I try `wp super-cache status`
Then STDERR should contain:
"""
Error: WP Super Cache needs to be installed to use its WP-CLI commands.
"""
When I run `wp plugin install wp-super-cache`
Then STDOUT should contain:
"""
Plugin installed successfully.
"""
And the wp-content/plugins/wp-super-cache directory should exist
When I try `wp super-cache enable`
Then STDERR should contain:
"""
Error: WP Super Cache needs to be activated to use its WP-CLI commands.
"""
When I run `wp plugin activate wp-super-cache`
And I run `wp super-cache enable`
Then STDOUT should contain:
"""
Success: The WP Super Cache is enabled.
"""
When I run `wp super-cache flush`
Then STDOUT should contain:
"""
Success: Cache cleared.
"""
When I run `wp post create --post_title='Test post' --post_status=publish --porcelain`
Then save STDOUT as {POST_ID}
When I run `wp super-cache flush --post_id={POST_ID}`
Then STDOUT should contain:
"""
Success: Post cache cleared.
"""
When I try `wp super-cache flush --post_id=invalid`
Then STDERR should contain:
"""
Error: This is not a valid post id.
"""