File tree Expand file tree Collapse file tree 1 file changed +27
-10
lines changed
Expand file tree Collapse file tree 1 file changed +27
-10
lines changed Original file line number Diff line number Diff line change 1- Feature : Manage site-wide custom fields .
1+ Feature : Manage site custom fields
22
33 @require-wp-5.0
4- Scenario : Non-multisite
5- Given a WP install
4+ Scenario : Site meta CRUD
5+ Given a WP multisite installation
66
7- When I run `wp site-meta`
8- Then STDOUT should contain:
7+ When I run `wp site meta add 1 foo 'bar' `
8+ Then STDOUT should not be empty
9+
10+ When I run `wp site meta get 1 foo`
11+ Then STDOUT should be:
912 """
10- usage: wp site meta
13+ bar
1114 """
1215
13- When I try `wp site-meta get 1 test`
14- Then STDOUT should be empty
15- And STDERR should contain:
16+ When I try `wp site meta get 999999 foo`
17+ Then STDERR should be:
1618 """
17- This is not a multisite install .
19+ Error: Could not find the site with ID 999999 .
1820 """
1921 And the return code should be 1
22+
23+ When I run `wp site meta set 1 foo '[ "1", "2" ]' --format=json`
24+ Then STDOUT should not be empty
25+
26+ When I run `wp site meta get 1 foo --format=json`
27+ Then STDOUT should be:
28+ """
29+ ["1","2"]
30+ """
31+
32+ When I run `wp site meta delete 1 foo`
33+ Then STDOUT should not be empty
34+
35+ When I try `wp site meta get 1 foo`
36+ Then the return code should be 1
You can’t perform that action at this time.
0 commit comments