Skip to content

Commit 18e7657

Browse files
committed
add functional tests
1 parent 9de1178 commit 18e7657

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

features/search-replace.feature

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ Feature: Do global search/replace
473473
"""
474474
And STDERR should be empty
475475

476+
@suppress_report__only_changes
476477
Scenario: Suppress report or only report changes
477478
Given a WP install
478479

@@ -570,6 +571,18 @@ Feature: Do global search/replace
570571
"""
571572
And STDERR should be empty
572573

574+
When I run `wp search-replace nobaz1 baz6 --report-changed-only`
575+
Then STDOUT should contain:
576+
"""
577+
Success: Made 0 replacements.
578+
"""
579+
And STDOUT should not contain:
580+
"""
581+
Table Column Replacements Type
582+
"""
583+
And STDERR should be empty
584+
585+
@no_table__no_primary_key
573586
Scenario: Deal with non-existent table and table with no primary keys
574587
Given a WP install
575588

@@ -609,6 +622,18 @@ Feature: Do global search/replace
609622
| no_key | | skipped | |
610623
And STDERR should be empty
611624

625+
And I run `wp search-replace foo bar no_key --report-changed-only`
626+
Then STDOUT should contain:
627+
"""
628+
Success: Made 0 replacements.
629+
"""
630+
And STDOUT should not contain:
631+
"""
632+
| Table | Column | Replacements | Type |
633+
| no_key | | skipped | |
634+
"""
635+
And STDERR should be empty
636+
612637
When I try `wp search-replace foo bar no_key --no-report`
613638
Then STDOUT should contain:
614639
"""

0 commit comments

Comments
 (0)