@@ -59,44 +59,49 @@ Feature: Generate new WordPress sites
59
59
60
60
Scenario : Generate subdirectory sites
61
61
Given a WP multisite subdirectory install
62
+ When I run `wp site generate --count=1`
63
+ Then STDOUT should be empty
64
+ And I run `wp site list --site__in=2 --field=url | sed -e's,^\(.*\)://.*,\1,g'`
65
+ And save STDOUT as {SCHEME}
62
66
63
- When I run `wp site generate --count=1`
64
- Then STDOUT should be empty
65
-
66
- When I run `wp site list --fields=blog_id,url`
67
- Then STDOUT should be a table containing rows:
68
- | blog_id | url |
69
- | 1 | https ://example .com / |
70
- | 2 | https ://example .com /site1 / |
71
- When I run `wp site list --format=ids`
72
- Then STDOUT should be:
73
- """
74
- 1 2
75
- """
67
+ When I run `wp site list --fields=blog_id,url`
68
+ Then STDOUT should be a table containing rows:
69
+ | blog_id | url |
70
+ | 1 | https ://example .com / |
71
+ | 2 | {SCHEME }://example .com /site1 / |
72
+ When I run `wp site list --format=ids`
73
+ Then STDOUT should be:
74
+ """
75
+ 1 2
76
+ """
76
77
77
78
Scenario : Generate sites with a slug
78
- Given a WP multisite subdirectory install
79
- When I run `wp site generate --count=2 --slug=subsite`
80
- Then STDOUT should be empty
79
+ Given a WP multisite subdirectory install
80
+ When I run `wp site generate --count=2 --slug=subsite`
81
+ Then STDOUT should be empty
82
+ And I run `wp site list --site__in=2 --field=url | sed -e's,^\(.*\)://.*,\1,g'`
83
+ And save STDOUT as {SCHEME1}
84
+ And I run `wp site list --site__in=3 --field=url | sed -e's,^\(.*\)://.*,\1,g'`
85
+ And save STDOUT as {SCHEME2}
81
86
82
- When I run `wp site list --fields=blog_id,url`
83
- Then STDOUT should be a table containing rows:
84
- | blog_id | url |
85
- | 1 | https ://example .com / |
86
- | 2 | https ://example .com /subsite1 / |
87
- | 3 | https ://example .com /subsite2 / |
88
- When I run `wp site list --format=ids`
89
- Then STDOUT should be:
90
- """
91
- 1 2 3
92
- """
87
+ When I run `wp site list --fields=blog_id,url`
88
+ Then STDOUT should be a table containing rows:
89
+ | blog_id | url |
90
+ | 1 | https ://example .com / |
91
+ | 2 | { SCHEME1 } ://example .com /subsite1 / |
92
+ | 3 | { SCHEME2 } ://example .com /subsite2 / |
93
+ When I run `wp site list --format=ids`
94
+ Then STDOUT should be:
95
+ """
96
+ 1 2 3
97
+ """
93
98
94
99
Scenario : Generate sites with reserved slug
95
- Given a WP multisite subdirectory install
96
- When I try `wp site generate --count=2 --slug=page`
97
- Then STDERR should contain:
98
- """
99
- The following words are reserved and cannot be used as blog names: page, comments, blog, files, feed
100
- """
101
- And STDOUT should be empty
102
- And the return code should be 1
100
+ Given a WP multisite subdirectory install
101
+ When I try `wp site generate --count=2 --slug=page`
102
+ Then STDERR should contain:
103
+ """
104
+ The following words are reserved and cannot be used as blog names: page, comments, blog, files, feed
105
+ """
106
+ And STDOUT should be empty
107
+ And the return code should be 1
0 commit comments