-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy paththeme-cache.feature
More file actions
76 lines (65 loc) · 1.8 KB
/
theme-cache.feature
File metadata and controls
76 lines (65 loc) · 1.8 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
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
Feature: Manage theme cache
Background:
Given a WP installation
Scenario: Clear cache for a single theme
When I run `wp theme install twentytwentyfour --activate`
Then STDOUT should contain:
"""
Success:
"""
When I run `wp theme cache clear twentytwentyfour`
Then STDOUT should be:
"""
Success: Cleared cache for 'twentytwentyfour' theme.
"""
Scenario: Clear cache for multiple themes
When I run `wp theme install twentytwentythree`
Then STDOUT should contain:
"""
Success:
"""
When I run `wp theme install twentytwentyfour`
Then STDOUT should contain:
"""
Success:
"""
When I run `wp theme cache clear twentytwentythree twentytwentyfour`
Then STDOUT should be:
"""
Success: Cleared cache for 2 themes.
"""
Scenario: Clear cache for all themes
When I run `wp theme install twentytwentythree`
Then STDOUT should contain:
"""
Success:
"""
When I run `wp theme cache clear --all`
Then STDOUT should contain:
"""
Success: Cleared cache for
"""
And STDOUT should contain:
"""
themes.
"""
Scenario: Clear cache for non-existent theme
When I try `wp theme cache clear nonexistent`
Then STDERR should contain:
"""
Warning: Theme 'nonexistent' not found.
"""
And the return code should be 1
Scenario: Clear cache with no arguments
When I try `wp theme cache clear`
Then STDERR should be:
"""
Error: Please specify one or more themes, or use --all.
"""
And the return code should be 1
Scenario: Flush the entire theme cache group
When I run `wp theme cache flush`
Then STDOUT should be:
"""
Success: The theme cache was flushed.
"""