@@ -207,14 +207,14 @@ Feature: Do global search/replace
207207 And a setup-theme-mod.php file:
208208 """
209209 <?php
210- set_theme_mod( 'header_image_data', (object) array( 'url' => 'http ://subdomain.example.com/foo.jpg' ) );
210+ set_theme_mod( 'header_image_data', (object) array( 'url' => 'https ://subdomain.example.com/foo.jpg' ) );
211211 """
212212 And I run `wp eval-file setup-theme-mod.php`
213213
214214 When I run `wp theme mod get header_image_data`
215215 Then STDOUT should be a table containing rows:
216- | key | value |
217- | header_image_data | {"url ":"http :\/\/subdomain .example .com \/foo .jpg "} |
216+ | key | value |
217+ | header_image_data | {"url ":"https :\/\/subdomain .example .com \/foo .jpg "} |
218218
219219 When I run `wp search-replace subdomain.example.com example.com --no-recurse-objects`
220220 Then STDOUT should be a table containing rows:
@@ -228,32 +228,32 @@ Feature: Do global search/replace
228228
229229 When I run `wp theme mod get header_image_data`
230230 Then STDOUT should be a table containing rows:
231- | key | value |
232- | header_image_data | {"url ":"http :\/\/example .com \/foo .jpg "} |
231+ | key | value |
232+ | header_image_data | {"url ":"https :\/\/example .com \/foo .jpg "} |
233233
234234 Scenario : Search and replace with quoted strings
235235 Given a WP install
236236
237- When I run `wp post create --post_content='<a href="http ://apple.com">Apple</a>' --porcelain`
237+ When I run `wp post create --post_content='<a href="https ://apple.com">Apple</a>' --porcelain`
238238 Then save STDOUT as {POST_ID}
239239
240240 When I run `wp post get {POST_ID} --field=content`
241241 Then STDOUT should be:
242242 """
243- <a href="http ://apple.com">Apple</a>
243+ <a href="https ://apple.com">Apple</a>
244244 """
245245
246- When I run `wp search-replace '<a href="http ://apple.com">Apple</a>' '<a href="http ://google.com">Google</a>' --dry-run`
246+ When I run `wp search-replace '<a href="https ://apple.com">Apple</a>' '<a href="https ://google.com">Google</a>' --dry-run`
247247 Then STDOUT should be a table containing rows:
248248 | Table | Column | Replacements | Type |
249249 | wp_posts | post_content | 1 | SQL |
250250
251- When I run `wp search-replace '<a href="http ://apple.com">Apple</a>' '<a href="http ://google.com">Google</a>' `
251+ When I run `wp search-replace '<a href="https ://apple.com">Apple</a>' '<a href="https ://google.com">Google</a>' `
252252 Then STDOUT should be a table containing rows:
253253 | Table | Column | Replacements | Type |
254254 | wp_posts | post_content | 1 | SQL |
255255
256- When I run `wp search-replace '<a href="http ://google.com">Google</a>' '<a href="http ://apple.com">Apple</a>' --dry-run`
256+ When I run `wp search-replace '<a href="https ://google.com">Google</a>' '<a href="https ://apple.com">Apple</a>' --dry-run`
257257 Then STDOUT should contain:
258258 """
259259 1 replacement to be made.
@@ -262,7 +262,7 @@ Feature: Do global search/replace
262262 When I run `wp post get {POST_ID} --field=content`
263263 Then STDOUT should be:
264264 """
265- <a href="http ://google.com">Google</a>
265+ <a href="https ://google.com">Google</a>
266266 """
267267
268268 Scenario : Search and replace with the same terms
@@ -303,16 +303,16 @@ Feature: Do global search/replace
303303 | wp_posts | guid | 20 | SQL |
304304
305305 Examples :
306- | replacement | flags |
307- | {SITEURL }/subdir | |
308- | http ://newdomain .com | |
309- | http ://newdomain .com | --dry -run |
306+ | replacement | flags |
307+ | {SITEURL }/subdir | |
308+ | https ://newdomain .com | |
309+ | https ://newdomain .com | --dry -run |
310310
311311 Scenario Outline : Choose replacement method (PHP or MySQL/MariaDB) given proper flags or data.
312312 Given a WP install
313313 And I run `wp option get siteurl`
314314 And save STDOUT as {SITEURL}
315- When I run `wp search-replace <flags> {SITEURL} http ://wordpress.org`
315+ When I run `wp search-replace <flags> {SITEURL} https ://wordpress.org`
316316
317317 Then STDOUT should be a table containing rows:
318318 | Table | Column | Replacements | Type |
@@ -357,7 +357,7 @@ Feature: Do global search/replace
357357 When I run `wp option get home`
358358 Then STDOUT should be:
359359 """
360- http ://example.com
360+ https ://example.com
361361 """
362362
363363 When I run `wp search-replace 'EXAMPLE.com' 'BAXAMPLE.com' wp_options --regex --regex-flags=i`
@@ -368,38 +368,38 @@ Feature: Do global search/replace
368368 When I run `wp option get home`
369369 Then STDOUT should be:
370370 """
371- http ://BAXAMPLE.com
371+ https ://BAXAMPLE.com
372372 """
373373
374374 Scenario : Search replace with a regex delimiter
375375 Given a WP install
376376
377- When I run `wp search-replace 'HTTP ://EXAMPLE.COM' 'http ://example.jp/' wp_options --regex --regex-flags=i --regex-delimiter='#' `
377+ When I run `wp search-replace 'HTTPS ://EXAMPLE.COM' 'https ://example.jp/' wp_options --regex --regex-flags=i --regex-delimiter='#' `
378378 Then STDOUT should be a table containing rows:
379379 | Table | Column | Replacements | Type |
380380 | wp_options | option_value | 2 | PHP |
381381
382382 When I run `wp option get home`
383383 Then STDOUT should be:
384384 """
385- http ://example.jp
385+ https ://example.jp
386386 """
387387
388- When I run `wp search-replace 'http ://example.jp/' 'http ://example.com/' wp_options --regex-delimiter='/' `
388+ When I run `wp search-replace 'https ://example.jp/' 'https ://example.com/' wp_options --regex-delimiter='/' `
389389 Then STDOUT should be a table containing rows:
390390 | Table | Column | Replacements | Type |
391391 | wp_options | option_value | 2 | PHP |
392392
393393 When I run `wp option get home`
394394 Then STDOUT should be:
395395 """
396- http ://example.com
396+ https ://example.com
397397 """
398398
399- When I try `wp search-replace 'HTTP ://EXAMPLE.COM' 'http ://example.jp/' wp_options --regex --regex-flags=i --regex-delimiter='1' `
399+ When I try `wp search-replace 'HTTPS ://EXAMPLE.COM' 'https ://example.jp/' wp_options --regex --regex-flags=i --regex-delimiter='1' `
400400 Then STDERR should be:
401401 """
402- Error: The regex '1HTTP ://EXAMPLE.COM1i' fails.
402+ Error: The regex '1HTTPS ://EXAMPLE.COM1i' fails.
403403 preg_match(): Delimiter must not be alphanumeric or backslash.
404404 """
405405 And the return code should be 1
0 commit comments