Skip to content

Commit 21f1537

Browse files
Copilotswissspidy
andauthored
Fix test: use unique search term to avoid collisions with WP core content
Agent-Logs-Url: https://github.com/wp-cli/search-replace-command/sessions/0832cf35-01cd-463e-8334-064918206a6c Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 0e9bf73 commit 21f1537

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

features/search-replace.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ Feature: Do global search/replace
12071207
Scenario: The search_replace_unserialize_options hook allows overriding allowed_classes for unserialize
12081208

12091209
Given a WP install
1210-
And I run `wp option add cereal_isation 'O:8:"stdClass":1:{s:3:"foo";s:3:"bar";}'`
1210+
And I run `wp option add cereal_isation 'O:8:"stdClass":1:{s:3:"foo";s:13:"cereal_marker";}'`
12111211
And a hook.php file:
12121212
"""
12131213
<?php
@@ -1216,7 +1216,7 @@ Feature: Do global search/replace
12161216
} );
12171217
"""
12181218

1219-
When I try `wp search-replace bar baz`
1219+
When I try `wp search-replace cereal_marker cereal_replaced`
12201220
Then STDERR should contain:
12211221
"""
12221222
Warning: Skipping an uninitialized class "stdClass", replacements might not be complete.
@@ -1226,7 +1226,7 @@ Feature: Do global search/replace
12261226
Success: Made 0 replacements.
12271227
"""
12281228

1229-
When I run `wp --require=hook.php search-replace bar baz`
1229+
When I run `wp --require=hook.php search-replace cereal_marker cereal_replaced`
12301230
Then STDERR should be empty
12311231
And STDOUT should contain:
12321232
"""

0 commit comments

Comments
 (0)