File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1030,3 +1030,25 @@ Feature: Do global search/replace
1030
1030
"""
1031
1031
Success: 1 replacement to be made.
1032
1032
"""
1033
+
1034
+ # Regression test for https://github.com/wp-cli/search-replace-command/issues/68
1035
+ Scenario : Incomplete classes are handled gracefully during (un)serialization
1036
+
1037
+ Given a WP install
1038
+ And I run `wp option add cereal_isation 'a:1:{i:0;O:10:"CornFlakes":0:{}}' `
1039
+
1040
+ When I try `wp search-replace CornFlakes Smacks`
1041
+ Then STDERR should contain:
1042
+ """
1043
+ Warning: Skipping an uninitialized class "CornFlakes", replacements might not be complete.
1044
+ """
1045
+ And STDOUT should contain:
1046
+ """
1047
+ Success: Made 0 replacements.
1048
+ """
1049
+
1050
+ When I run `wp option get cereal_isation`
1051
+ Then STDOUT should contain:
1052
+ """
1053
+ a:1:{i:0;O:10:"CornFlakes":0:{}}
1054
+ """
You can’t perform that action at this time.
0 commit comments