diff --git a/features/comment.feature b/features/comment.feature index 754840d17..4d3330f5f 100644 --- a/features/comment.feature +++ b/features/comment.feature @@ -112,15 +112,15 @@ Feature: Manage WordPress comments When I run `wp comment url 1 {COMMENT_ID}` Then STDOUT should be: """ - http://example.com/?p=1#comment-1 - http://example.com/?p=1#comment-{COMMENT_ID} + https://example.com/?p=1#comment-1 + https://example.com/?p=1#comment-{COMMENT_ID} """ When I run `wp comment url {COMMENT_ID} 1` Then STDOUT should be: """ - http://example.com/?p=1#comment-{COMMENT_ID} - http://example.com/?p=1#comment-1 + https://example.com/?p=1#comment-{COMMENT_ID} + https://example.com/?p=1#comment-1 """ Scenario: Count comments diff --git a/features/menu-item.feature b/features/menu-item.feature index 2507896bb..01da75572 100644 --- a/features/menu-item.feature +++ b/features/menu-item.feature @@ -86,13 +86,13 @@ Feature: Manage WordPress menu items When I run `wp menu create "Grandparent Test"` Then STDOUT should not be empty - When I run `wp menu item add-custom grandparent-test Grandparent http://example.com/grandparent --porcelain` + When I run `wp menu item add-custom grandparent-test Grandparent https://example.com/grandparent --porcelain` Then save STDOUT as {GRANDPARENT_ID} - When I run `wp menu item add-custom grandparent-test Parent http://example.com/parent --porcelain --parent-id={GRANDPARENT_ID}` + When I run `wp menu item add-custom grandparent-test Parent https://example.com/parent --porcelain --parent-id={GRANDPARENT_ID}` Then save STDOUT as {PARENT_ID} - When I run `wp menu item add-custom grandparent-test Child http://example.com/child --porcelain --parent-id={PARENT_ID}` + When I run `wp menu item add-custom grandparent-test Child https://example.com/child --porcelain --parent-id={PARENT_ID}` Then save STDOUT as {CHILD_ID} When I run `wp menu item list grandparent-test --fields=title,db_id,menu_item_parent` diff --git a/features/option.feature b/features/option.feature index d126affc0..ec7312808 100644 --- a/features/option.feature +++ b/features/option.feature @@ -42,7 +42,7 @@ Feature: Manage WordPress options When I run `wp option list` Then STDOUT should contain: """ - home http://example.com + home https://example.com """ When I run `wp option add auto_opt --autoload=no 'bar'` diff --git a/features/post.feature b/features/post.feature index 1581826d5..489f6af69 100644 --- a/features/post.feature +++ b/features/post.feature @@ -250,8 +250,8 @@ Feature: Manage WordPress posts When I run `wp post url 1 {POST_ID}` Then STDOUT should be: """ - http://example.com/?p=1 - http://example.com/?p={POST_ID} + https://example.com/?p=1 + https://example.com/?p={POST_ID} """ Scenario: Update a post from file or STDIN diff --git a/features/site-empty.feature b/features/site-empty.feature index ae0d8d859..a55e5a902 100644 --- a/features/site-empty.feature +++ b/features/site-empty.feature @@ -71,7 +71,7 @@ Feature: Empty a WordPress site of its data When I run `wp site empty --yes` Then STDOUT should be: """ - Success: The site at 'http://example.com' was emptied. + Success: The site at 'https://example.com' was emptied. """ And the wp-content/uploads/large-image.jpg file should exist @@ -119,9 +119,9 @@ Feature: Empty a WordPress site of its data Then STDOUT should be empty When I run `wp --url=example.com/foo site empty --uploads --yes` - Then STDOUT should be: + Then STDOUT should contain: """ - Success: The site at 'http://example.com/foo' was emptied. + ://example.com/foo' was emptied. """ And the wp-content/uploads/sites/2/large-image.jpg file should not exist diff --git a/features/site.feature b/features/site.feature index e217f746c..e503f6bc4 100644 --- a/features/site.feature +++ b/features/site.feature @@ -20,7 +20,7 @@ Feature: Manage sites in a multisite installation When I run `wp site list --fields=blog_id,url` Then STDOUT should be a table containing rows: | blog_id | url | - | 1 | http://example.com/ | + | 1 | https://example.com/ | | 2 | http://first.example.com/ | When I run `wp site list --format=ids` @@ -44,18 +44,20 @@ Feature: Manage sites in a multisite installation When I run `wp site create --slug=first --porcelain` Then STDOUT should be a number And save STDOUT as {SITE_ID} + And I run `wp site list --site__in={SITE_ID} --field=url | sed -e's,^\(.*\)://.*,\1,g'` + And save STDOUT as {SCHEME} When I run `wp site list --fields=blog_id,url` Then STDOUT should be a table containing rows: - | blog_id | url | - | 1 | http://example.com/ | - | 2 | http://example.com/first/ | + | blog_id | url | + | 1 | https://example.com/ | + | 2 | {SCHEME}://example.com/first/ | When I run `wp site list --field=url` Then STDOUT should be: """ - http://example.com/ - http://example.com/first/ + https://example.com/ + {SCHEME}://example.com/first/ """ When I try `wp site delete 1` @@ -69,7 +71,7 @@ Feature: Manage sites in a multisite installation When I run `wp site delete {SITE_ID} --yes` Then STDOUT should be: """ - Success: The site at 'http://example.com/first/' was deleted. + Success: The site at '{SCHEME}://example.com/first/' was deleted. """ When I try the previous command again @@ -81,32 +83,38 @@ Feature: Manage sites in a multisite installation When I run `wp site create --slug=first --porcelain` Then STDOUT should be a number And save STDOUT as {SITE_ID} + And I run `wp site list --site__in={SITE_ID} --field=url | sed -e's,^\(.*\)://.*,\1,g'` + And save STDOUT as {SCHEME} When I run `wp site list --fields=blog_id,url` Then STDOUT should be a table containing rows: - | blog_id | url | - | 1 | http://example.com/ | - | 2 | http://example.com/first/ | + | blog_id | url | + | 1 | https://example.com/ | + | 2 | {SCHEME}://example.com/first/ | When I run `wp site list --field=url --blog_id=2` Then STDOUT should be: """ - http://example.com/first/ + {SCHEME}://example.com/first/ """ Scenario: Delete a site by slug Given a WP multisite install When I run `wp site create --slug=first` - Then STDOUT should be: + Then STDOUT should contain: + """ + Success: Site 2 created: http """ - Success: Site 2 created: http://example.com/first/ + And STDOUT should contain: + """ + ://example.com/first/ """ When I run `wp site delete --slug=first --yes` - Then STDOUT should be: + Then STDOUT should contain: """ - Success: The site at 'http://example.com/first/' was deleted. + ://example.com/first/' was deleted. """ When I try the previous command again @@ -118,22 +126,26 @@ Feature: Manage sites in a multisite installation When I run `wp site create --slug=first --porcelain` Then STDOUT should be a number And save STDOUT as {SITE_ID} + And I run `wp site list --site__in={SITE_ID} --field=url | sed -e's,^\(.*\)://.*,\1,g'` + And save STDOUT as {SCHEME} When I run `wp site url {SITE_ID}` Then STDOUT should be: """ - http://example.com/first/ + {SCHEME}://example.com/first/ """ When I run `wp site create --slug=second --porcelain` Then STDOUT should be a number And save STDOUT as {SECOND_ID} + And I run `wp site list --site__in={SECOND_ID} --field=url | sed -e's,^\(.*\)://.*,\1,g'` + And save STDOUT as {SECOND_SCHEME} When I run `wp site url {SECOND_ID} {SITE_ID}` Then STDOUT should be: """ - http://example.com/second/ - http://example.com/first/ + {SECOND_SCHEME}://example.com/second/ + {SCHEME}://example.com/first/ """ Scenario: Archive/unarchive a site @@ -413,9 +425,9 @@ Feature: Manage sites in a multisite installation """ When I run `wp --url=example.com/first option get home` - Then STDOUT should be: + Then STDOUT should contain: """ - http://example.com/first + ://example.com/first """ Scenario: Create site with title containing slash diff --git a/features/term.feature b/features/term.feature index f957ee2a8..a4e764afc 100644 --- a/features/term.feature +++ b/features/term.feature @@ -131,21 +131,21 @@ Feature: Manage WordPress terms When I run `wp term url category {TERM_ID}` Then STDOUT should be: """ - http://example.com/?cat=2 + https://example.com/?cat=2 """ When I run `wp term url category {TERM_ID} {SECOND_TERM_ID}` Then STDOUT should be: """ - http://example.com/?cat=2 - http://example.com/?cat=3 + https://example.com/?cat=2 + https://example.com/?cat=3 """ When I run `wp term url category {SECOND_TERM_ID} {TERM_ID}` Then STDOUT should be: """ - http://example.com/?cat=3 - http://example.com/?cat=2 + https://example.com/?cat=3 + https://example.com/?cat=2 """ Scenario: Make sure WordPress receives the slashed data it expects diff --git a/features/user.feature b/features/user.feature index 7d9932961..6381374f0 100644 --- a/features/user.feature +++ b/features/user.feature @@ -398,8 +398,8 @@ Feature: Manage WordPress users When I run `wp user list --include=1,2 --field=url` Then STDOUT should be: """ - http://example.com/?author=1 - http://example.com/?author=2 + https://example.com/?author=1 + https://example.com/?author=2 """ Scenario: Get user with email as login