@@ -44,18 +44,20 @@ Feature: Manage sites in a multisite installation
4444 When I run `wp site create --slug=first --porcelain`
4545 Then STDOUT should be a number
4646 And save STDOUT as {SITE_ID}
47+ And I run `wp site list --site__in={SITE_ID} --field=url | sed -e's,^\(.*\)://.*,\1,g'`
48+ And save STDOUT as {SCHEME}
4749
4850 When I run `wp site list --fields=blog_id,url`
4951 Then STDOUT should be a table containing rows:
50- | blog_id | url |
51- | 1 | https ://example .com / |
52- | 2 | https ://example .com /first / |
52+ | blog_id | url |
53+ | 1 | https ://example .com / |
54+ | 2 | { SCHEME } ://example .com /first / |
5355
5456 When I run `wp site list --field=url`
5557 Then STDOUT should be:
5658 """
5759 https://example.com/
58- https ://example.com/first/
60+ {SCHEME} ://example.com/first/
5961 """
6062
6163 When I try `wp site delete 1`
@@ -69,7 +71,7 @@ Feature: Manage sites in a multisite installation
6971 When I run `wp site delete {SITE_ID} --yes`
7072 Then STDOUT should be:
7173 """
72- Success: The site at 'https ://example.com/first/' was deleted.
74+ Success: The site at '{SCHEME} ://example.com/first/' was deleted.
7375 """
7476
7577 When I try the previous command again
@@ -81,32 +83,38 @@ Feature: Manage sites in a multisite installation
8183 When I run `wp site create --slug=first --porcelain`
8284 Then STDOUT should be a number
8385 And save STDOUT as {SITE_ID}
86+ And I run `wp site list --site__in={SITE_ID} --field=url | sed -e's,^\(.*\)://.*,\1,g'`
87+ And save STDOUT as {SCHEME}
8488
8589 When I run `wp site list --fields=blog_id,url`
8690 Then STDOUT should be a table containing rows:
87- | blog_id | url |
88- | 1 | https ://example .com / |
89- | 2 | https ://example .com /first / |
91+ | blog_id | url |
92+ | 1 | https ://example .com / |
93+ | 2 | { SCHEME } ://example .com /first / |
9094
9195 When I run `wp site list --field=url --blog_id=2`
9296 Then STDOUT should be:
9397 """
94- https ://example.com/first/
98+ {SCHEME} ://example.com/first/
9599 """
96100
97101 Scenario : Delete a site by slug
98102 Given a WP multisite install
99103
100104 When I run `wp site create --slug=first`
101- Then STDOUT should be :
105+ Then STDOUT should contain :
102106 """
103- Success: Site 2 created: https://example.com/first/
107+ Success: Site 2 created: http
108+ """
109+ And STDOUT should contain:
110+ """
111+ ://example.com/first/
104112 """
105113
106114 When I run `wp site delete --slug=first --yes`
107- Then STDOUT should be :
115+ Then STDOUT should contain :
108116 """
109- Success: The site at 'https ://example.com/first/' was deleted.
117+ ://example.com/first/' was deleted.
110118 """
111119
112120 When I try the previous command again
@@ -118,22 +126,26 @@ Feature: Manage sites in a multisite installation
118126 When I run `wp site create --slug=first --porcelain`
119127 Then STDOUT should be a number
120128 And save STDOUT as {SITE_ID}
129+ And I run `wp site list --site__in={SITE_ID} --field=url | sed -e's,^\(.*\)://.*,\1,g'`
130+ And save STDOUT as {SCHEME}
121131
122132 When I run `wp site url {SITE_ID}`
123133 Then STDOUT should be:
124134 """
125- https ://example.com/first/
135+ {SCHEME} ://example.com/first/
126136 """
127137
128138 When I run `wp site create --slug=second --porcelain`
129139 Then STDOUT should be a number
130140 And save STDOUT as {SECOND_ID}
141+ And I run `wp site list --site__in={SECOND_ID} --field=url | sed -e's,^\(.*\)://.*,\1,g'`
142+ And save STDOUT as {SECOND_SCHEME}
131143
132144 When I run `wp site url {SECOND_ID} {SITE_ID}`
133145 Then STDOUT should be:
134146 """
135- https ://example.com/second/
136- https ://example.com/first/
147+ {SECOND_SCHEME} ://example.com/second/
148+ {SCHEME} ://example.com/first/
137149 """
138150
139151 Scenario : Archive/unarchive a site
@@ -413,9 +425,9 @@ Feature: Manage sites in a multisite installation
413425 """
414426
415427 When I run `wp --url=example.com/first option get home`
416- Then STDOUT should be :
428+ Then STDOUT should contain :
417429 """
418- https ://example.com/first
430+ ://example.com/first
419431 """
420432
421433 Scenario : Create site with title containing slash
0 commit comments