Skip to content

Commit de3edde

Browse files
authored
Merge pull request #216 from wp-cli/fix/use-https-example-com
Adapt feature test to use HTTPS with example.com
2 parents 7754641 + 894295b commit de3edde

File tree

3 files changed

+36
-35
lines changed

3 files changed

+36
-35
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ for more details on the `OPTIMIZE TABLE` statement.
244244
Displays the database table prefix.
245245

246246
~~~
247-
wp db prefix
247+
wp db prefix
248248
~~~
249249

250250
Display the database table prefix, as defined by the database handler's interpretation of the current site.
@@ -631,13 +631,13 @@ They can be concatenated. For instance, the default match color of black on a mu
631631
wp_options:option_value
632632
1:http://wordpress-develop.dev
633633
wp_options:option_value
634-
1:http://example.com/foo
634+
1:https://example.com/foo
635635
...
636636

637637
# Search through a multisite database on the subsite 'foo' for the 'example.com' string
638638
$ wp db search example.com --url=example.com/foo
639639
wp_2_comments:comment_author_url
640-
1:http://example.com/
640+
1:https://example.com/
641641
wp_2_options:option_value
642642
...
643643

features/db-search.feature

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Feature: Search through the database
2828
Then STDOUT should contain:
2929
"""
3030
wp_options:option_value
31-
1:http://example.com
31+
1:https://example.com
3232
"""
3333
And STDOUT should not contain:
3434
"""
@@ -44,7 +44,7 @@ Feature: Search through the database
4444
Then STDOUT should contain:
4545
"""
4646
wp_options:option_value
47-
1:http://example.com
47+
1:https://example.com
4848
"""
4949
And STDOUT should not contain:
5050
"""
@@ -279,6 +279,7 @@ Feature: Search through the database
279279
"""
280280
And the return code should be 0
281281

282+
@require-wp-4.0
282283
Scenario: Search on a multisite install
283284
Given a WP multisite install
284285
And I run `wp site create --slug=foo`
@@ -312,7 +313,7 @@ Feature: Search through the database
312313
Then STDOUT should contain:
313314
"""
314315
wp_options:option_value
315-
1:http://example.com
316+
1:https://example.com
316317
"""
317318
And STDOUT should not contain:
318319
"""
@@ -336,7 +337,7 @@ Feature: Search through the database
336337
Then STDOUT should contain:
337338
"""
338339
wp_options:option_value
339-
1:http://example.com
340+
1:https://example.com
340341
"""
341342
And STDOUT should not contain:
342343
"""
@@ -364,7 +365,7 @@ Feature: Search through the database
364365
And STDOUT should contain:
365366
"""
366367
wp_2_options:option_value
367-
1:http://example.com/foo
368+
1:https://example.com/foo
368369
"""
369370
And STDOUT should not contain:
370371
"""
@@ -384,12 +385,12 @@ Feature: Search through the database
384385
Then STDOUT should contain:
385386
"""
386387
wp_options:option_value
387-
1:http://example.com
388+
1:https://example.com
388389
"""
389390
And STDOUT should contain:
390391
"""
391392
wp_2_options:option_value
392-
1:http://example.com/foo
393+
1:https://example.com/foo
393394
"""
394395
And STDOUT should not contain:
395396
"""
@@ -409,7 +410,7 @@ Feature: Search through the database
409410
Then STDOUT should contain:
410411
"""
411412
wp_options:option_value
412-
1:http://example.com
413+
1:https://example.com
413414
"""
414415
And STDOUT should not contain:
415416
"""
@@ -433,12 +434,12 @@ Feature: Search through the database
433434
Then STDOUT should contain:
434435
"""
435436
wp_options:option_value
436-
1:http://example.com
437+
1:https://example.com
437438
"""
438439
And STDOUT should contain:
439440
"""
440441
wp_2_options:option_value
441-
1:http://example.com/foo
442+
1:https://example.com/foo
442443
"""
443444
And STDOUT should contain:
444445
"""
@@ -460,7 +461,7 @@ Feature: Search through the database
460461
Then STDOUT should contain:
461462
"""
462463
wp_options:option_value
463-
1:http://example.com
464+
1:https://example.com
464465
"""
465466
And STDOUT should not contain:
466467
"""
@@ -488,7 +489,7 @@ Feature: Search through the database
488489
And STDOUT should contain:
489490
"""
490491
wp_2_options:option_value
491-
1:http://example.com/foo
492+
1:https://example.com/foo
492493
"""
493494
And STDOUT should not contain:
494495
"""
@@ -509,12 +510,12 @@ Feature: Search through the database
509510
Then STDOUT should contain:
510511
"""
511512
wp_options:option_value
512-
1:http://example.com
513+
1:https://example.com
513514
"""
514515
And STDOUT should contain:
515516
"""
516517
wp_2_options:option_value
517-
1:http://example.com/foo
518+
1:https://example.com/foo
518519
"""
519520
And STDOUT should contain:
520521
"""
@@ -537,12 +538,12 @@ Feature: Search through the database
537538
Then STDOUT should contain:
538539
"""
539540
wp_options:option_value
540-
1:http://example.com
541+
1:https://example.com
541542
"""
542543
And STDOUT should contain:
543544
"""
544545
wp_2_options:option_value
545-
1:http://example.com/foo
546+
1:https://example.com/foo
546547
"""
547548
And STDOUT should contain:
548549
"""
@@ -712,7 +713,7 @@ Feature: Search through the database
712713
Then STDOUT should contain:
713714
"""
714715
wp_options:option_value
715-
1:http://example.com
716+
1:https://example.com
716717
"""
717718
And STDOUT should not contain:
718719
"""
@@ -868,31 +869,31 @@ Feature: Search through the database
868869
Then STDOUT should contain:
869870
"""
870871
wp_options:option_value
871-
1:http://example.com
872+
1:https://example.com
872873
wp_options:option_value
873-
2:http://example.com
874+
2:https://example.com
874875
"""
875876

876877
When I run `wp db search example.com --table_column_once`
877878
Then STDOUT should contain:
878879
"""
879880
wp_options:option_value
880-
1:http://example.com
881-
2:http://example.com
881+
1:https://example.com
882+
2:https://example.com
882883
"""
883884

884885
When I run `wp db search example.com --one_line`
885886
Then STDOUT should contain:
886887
"""
887-
wp_options:option_value:1:http://example.com
888-
wp_options:option_value:2:http://example.com
888+
wp_options:option_value:1:https://example.com
889+
wp_options:option_value:2:https://example.com
889890
"""
890891

891892
When I run `wp db search example.com --table_column_once --one_line`
892893
Then STDOUT should contain:
893894
"""
894-
wp_options:option_value:1:http://example.com
895-
wp_options:option_value:2:http://example.com
895+
wp_options:option_value:1:https://example.com
896+
wp_options:option_value:2:https://example.com
896897
"""
897898

898899
When I run `wp db search example.com --all-tables --before_context=0 --after_context=0 --matches_only`
@@ -920,35 +921,35 @@ Feature: Search through the database
920921
Then STDOUT should strictly contain:
921922
"""
922923
wp_options:option_value
923-
[33;1m1[0m:http://[43m[30mexample.com[0m
924+
[33;1m1[0m:https://[43m[30mexample.com[0m
924925
"""
925926

926927
When I run `SHELL_PIPE=0 wp db search example.com --table_column_color=%r --id_color=%g --match_color=%b`
927928
Then STDOUT should strictly contain:
928929
"""
929930
wp_options:option_value
930-
[32m1[0m:http://[34mexample.com[0m
931+
[32m1[0m:https://[34mexample.com[0m
931932
"""
932933

933934
When I run `SHELL_PIPE=0 wp db search example.com --table_column_color=%r`
934935
Then STDOUT should strictly contain:
935936
"""
936937
wp_options:option_value
937-
[33;1m1[0m:http://[43m[30mexample.com[0m
938+
[33;1m1[0m:https://[43m[30mexample.com[0m
938939
"""
939940

940941
When I run `SHELL_PIPE=0 wp db search example.com --id_color=%g`
941942
Then STDOUT should strictly contain:
942943
"""
943944
wp_options:option_value
944-
[32m1[0m:http://[43m[30mexample.com[0m
945+
[32m1[0m:https://[43m[30mexample.com[0m
945946
"""
946947

947948
When I run `SHELL_PIPE=0 wp db search example.com --match_color=%b`
948949
Then STDOUT should strictly contain:
949950
"""
950951
wp_options:option_value
951-
[33;1m1[0m:http://[34mexample.com[0m
952+
[33;1m1[0m:https://[34mexample.com[0m
952953
"""
953954

954955
When I run `SHELL_PIPE=0 wp db search example.com --before_context=0 --after_context=0`

src/DB_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,13 +1223,13 @@ public function prefix() {
12231223
* wp_options:option_value
12241224
* 1:http://wordpress-develop.dev
12251225
* wp_options:option_value
1226-
* 1:http://example.com/foo
1226+
* 1:https://example.com/foo
12271227
* ...
12281228
*
12291229
* # Search through a multisite database on the subsite 'foo' for the 'example.com' string
12301230
* $ wp db search example.com --url=example.com/foo
12311231
* wp_2_comments:comment_author_url
1232-
* 1:http://example.com/
1232+
* 1:https://example.com/
12331233
* wp_2_options:option_value
12341234
* ...
12351235
*

0 commit comments

Comments
 (0)