@@ -24,7 +24,7 @@ Feature: Generate new WordPress sites
2424 When I try `wp site generate --count=4 --network_id=2`
2525 Then STDERR should contain:
2626 """
27- Network with id 2 does not exist.
27+ Network with id 2 does not exist.
2828 """
2929 And STDOUT should be empty
3030 And the return code should be 1
@@ -72,4 +72,31 @@ Feature: Generate new WordPress sites
7272 Then STDOUT should be:
7373 """
7474 1 2
75- """
75+ """
76+
77+ 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
81+
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+ """
93+
94+ 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
0 commit comments