You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -245,13 +245,13 @@ Feature: Do global search/replace
245
245
246
246
When I run `wp search-replace '<a href="https://apple.com">Apple</a>''<a href="https://google.com">Google</a>' --dry-run`
247
247
Then STDOUT should be a table containing rows:
248
-
| Table| Column | Replacements | Type |
249
-
| wp_posts| post_content | 1 | SQL |
248
+
| Table | Column | Replacements | Type |
249
+
| wp_posts | post_content | 1 | SQL |
250
250
251
251
When I run `wp search-replace '<a href="https://apple.com">Apple</a>''<a href="https://google.com">Google</a>'`
252
252
Then STDOUT should be a table containing rows:
253
-
| Table| Column | Replacements | Type |
254
-
| wp_posts| post_content | 1 | SQL |
253
+
| Table | Column | Replacements | Type |
254
+
| wp_posts | post_content | 1 | SQL |
255
255
256
256
When I run `wp search-replace '<a href="https://google.com">Google</a>''<a href="https://apple.com">Apple</a>' --dry-run`
257
257
Then STDOUT should contain:
@@ -351,8 +351,8 @@ Feature: Do global search/replace
351
351
352
352
When I run `wp search-replace 'EXAMPLE.com''BAXAMPLE.com' wp_options --regex`
353
353
Then STDOUT should be a table containing rows:
354
-
| Table | Column | Replacements | Type|
355
-
| wp_options | option_value | 0 | PHP|
354
+
| Table | Column | Replacements | Type |
355
+
| wp_options | option_value | 0 | PHP |
356
356
357
357
When I run `wp option get home`
358
358
Then STDOUT should be:
@@ -362,8 +362,8 @@ Feature: Do global search/replace
362
362
363
363
When I run `wp search-replace 'EXAMPLE.com''BAXAMPLE.com' wp_options --regex --regex-flags=i`
364
364
Then STDOUT should be a table containing rows:
365
-
| Table | Column | Replacements | Type|
366
-
| wp_options | option_value | 5 | PHP|
365
+
| Table | Column | Replacements | Type |
366
+
| wp_options | option_value | 5 | PHP |
367
367
368
368
When I run `wp option get home`
369
369
Then STDOUT should be:
@@ -376,8 +376,8 @@ Feature: Do global search/replace
376
376
377
377
When I run `wp search-replace 'HTTPS://EXAMPLE.COM''https://example.jp/' wp_options --regex --regex-flags=i --regex-delimiter='#'`
378
378
Then STDOUT should be a table containing rows:
379
-
| Table | Column | Replacements | Type|
380
-
| wp_options | option_value | 2 | PHP|
379
+
| Table | Column | Replacements | Type |
380
+
| wp_options | option_value | 2 | PHP |
381
381
382
382
When I run `wp option get home`
383
383
Then STDOUT should be:
@@ -387,8 +387,8 @@ Feature: Do global search/replace
387
387
388
388
When I run `wp search-replace 'https://example.jp/''https://example.com/' wp_options --regex-delimiter='/'`
389
389
Then STDOUT should be a table containing rows:
390
-
| Table | Column | Replacements | Type|
391
-
| wp_options | option_value | 2 | PHP|
390
+
| Table | Column | Replacements | Type |
391
+
| wp_options | option_value | 2 | PHP |
392
392
393
393
When I run `wp option get home`
394
394
Then STDOUT should be:
@@ -548,12 +548,12 @@ Feature: Do global search/replace
548
548
Success: Made 3 replacements.
549
549
"""
550
550
And STDOUT should be a table containing rows:
551
-
| Table | Column | Replacements | Type |
552
-
| wp_commentmeta | meta_key | 0 | SQL |
553
-
| wp_options | option_value | 1 | PHP |
554
-
| wp_postmeta | meta_value | 1 | SQL |
555
-
| wp_posts | post_title | 1 | SQL |
556
-
| wp_users | display_name | 0 | SQL |
551
+
| Table | Column | Replacements | Type |
552
+
| wp_commentmeta | meta_key | 0 | SQL |
553
+
| wp_options | option_value | 1 | PHP |
554
+
| wp_postmeta | meta_value | 1 | SQL |
555
+
| wp_posts | post_title | 1 | SQL |
556
+
| wp_users | display_name | 0 | SQL |
557
557
And STDERR should be empty
558
558
559
559
When I run `wp search-replace baz1 baz2 --report`
@@ -562,12 +562,12 @@ Feature: Do global search/replace
562
562
Success: Made 3 replacements.
563
563
"""
564
564
And STDOUT should be a table containing rows:
565
-
| Table | Column | Replacements | Type |
566
-
| wp_commentmeta | meta_key | 0 | SQL |
567
-
| wp_options | option_value | 1 | PHP |
568
-
| wp_postmeta | meta_value | 1 | SQL |
569
-
| wp_posts | post_title | 1 | SQL |
570
-
| wp_users | display_name | 0 | SQL |
565
+
| Table | Column | Replacements | Type |
566
+
| wp_commentmeta | meta_key | 0 | SQL |
567
+
| wp_options | option_value | 1 | PHP |
568
+
| wp_postmeta | meta_value | 1 | SQL |
569
+
| wp_posts | post_title | 1 | SQL |
570
+
| wp_users | display_name | 0 | SQL |
571
571
And STDERR should be empty
572
572
573
573
When I run `wp search-replace baz2 baz3 --no-report`
@@ -595,12 +595,12 @@ Feature: Do global search/replace
595
595
Success: Made 3 replacements.
596
596
"""
597
597
And STDOUT should be a table containing rows:
598
-
| Table | Column | Replacements | Type |
599
-
| wp_commentmeta | meta_key | 0 | SQL |
600
-
| wp_options | option_value | 1 | PHP |
601
-
| wp_postmeta | meta_value | 1 | SQL |
602
-
| wp_posts | post_title | 1 | SQL |
603
-
| wp_users | display_name | 0 | SQL |
598
+
| Table | Column | Replacements | Type |
599
+
| wp_commentmeta | meta_key | 0 | SQL |
600
+
| wp_options | option_value | 1 | PHP |
601
+
| wp_postmeta | meta_value | 1 | SQL |
602
+
| wp_posts | post_title | 1 | SQL |
603
+
| wp_users | display_name | 0 | SQL |
604
604
And STDERR should be empty
605
605
606
606
When I run `wp search-replace baz4 baz5 --report-changed-only`
@@ -609,10 +609,10 @@ Feature: Do global search/replace
609
609
Success: Made 3 replacements.
610
610
"""
611
611
And STDOUT should end with a table containing rows:
612
-
| Table | Column | Replacements | Type |
613
-
| wp_options | option_value | 1 | PHP |
614
-
| wp_postmeta | meta_value | 1 | SQL |
615
-
| wp_posts | post_title | 1 | SQL |
612
+
| Table | Column | Replacements | Type |
613
+
| wp_options | option_value | 1 | PHP |
614
+
| wp_postmeta | meta_value | 1 | SQL |
615
+
| wp_posts | post_title | 1 | SQL |
616
616
And STDOUT should not contain:
617
617
"""
618
618
wp_commentmeta meta_key 0 SQL
@@ -653,8 +653,8 @@ Feature: Do global search/replace
653
653
Success: Made 0 replacements.
654
654
"""
655
655
And STDOUT should end with a table containing rows:
656
-
| Table | Column | Replacements | Type |
657
-
| no_key | | skipped | |
656
+
| Table | Column | Replacements | Type |
657
+
| no_key | | skipped | |
658
658
And STDERR should be empty
659
659
660
660
And I run `wp search-replace foo bar no_key --report-changed-only --all-tables`
@@ -729,9 +729,9 @@ Feature: Do global search/replace
729
729
Success: 2 replacements to be made.
730
730
"""
731
731
And STDOUT should end with a table containing rows:
732
-
| Table | Column | Replacements | Type |
733
-
| wp_posts | post_content | 1 | SQL |
734
-
| wp_posts | post_title | 1 | SQL |
732
+
| Table | Column | Replacements | Type |
733
+
| wp_posts | post_content | 1 | SQL |
734
+
| wp_posts | post_title | 1 | SQL |
735
735
736
736
And STDOUT should contain:
737
737
"""
@@ -882,9 +882,9 @@ Feature: Do global search/replace
882
882
Success: 2 replacements to be made.
883
883
"""
884
884
And STDOUT should end with a table containing rows:
885
-
| Table | Column | Replacements | Type |
886
-
| wp_posts | post_content | 1 | PHP |
887
-
| wp_posts | post_title | 1 | PHP |
885
+
| Table | Column | Replacements | Type |
886
+
| wp_posts | post_content | 1 | PHP |
887
+
| wp_posts | post_title | 1 | PHP |
888
888
889
889
And STDOUT should contain:
890
890
"""
@@ -1037,11 +1037,11 @@ Feature: Do global search/replace
1037
1037
And a test_db.sql file:
1038
1038
"""
1039
1039
CREATE TABLE `wp_123_test` (
1040
-
`name` varchar(50),
1041
-
`value` varchar(5000),
1042
-
`created_at` datetime NOT NULL,
1043
-
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
1044
-
PRIMARY KEY (`name`)
1040
+
`name` varchar(50),
1041
+
`value` varchar(5000),
1042
+
`created_at` datetime NOT NULL,
1043
+
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
1044
+
PRIMARY KEY (`name`)
1045
1045
) ENGINE=InnoDB;
1046
1046
INSERT INTO `wp_123_test` VALUES ('test_val','wp_123_test_value_X','2016-11-15 14:41:33','2016-11-15 21:41:33');
1047
1047
INSERT INTO `wp_123_test` VALUES ('123.','wp_123_test_value_X','2016-11-15 14:41:33','2016-11-15 21:41:33');
@@ -1114,7 +1114,7 @@ Feature: Do global search/replace
1114
1114
When I try `wp search-replace mysqli_result stdClass`
1115
1115
Then STDERR should contain:
1116
1116
"""
1117
-
Warning: Skipping an inconvertible serialized object: "O:13:"mysqli_result":5:{s:13:"current_field";N;s:11:"field_count";N;s:7:"lengths";N;s:8:"num_rows";N;s:4:"type";N;}", replacements might not be complete.
1117
+
Warning: Skipping an inconvertible serialized object: "O:13:"mysqli_result":5:{s:13:"current_field";N;s:11:"field_count";N;s:7:"lengths";N;s:8:"num_rows";N;s:4:"type";N;}", replacements might not be complete. Reason: Cannot assign null to property mysqli_result::$current_field of type int.
1118
1118
"""
1119
1119
And STDOUT should contain:
1120
1120
"""
@@ -1199,19 +1199,19 @@ Feature: Do global search/replace
0 commit comments