Skip to content

Commit 6f2557b

Browse files
committed
Functional tests added.
1 parent 88b0b02 commit 6f2557b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

features/search-replace-export.feature

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,27 @@ Feature: Search / replace with file export
2020
http://example.com
2121
"""
2222

23+
When I run `wp search-replace example.com example.net --skip-tables=wp_options --export
24+
Then STDOUT should not contain:
25+
"""
26+
INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES
27+
('1', 'siteurl', 'http://example.com', 'yes'),
28+
"""
29+
2330
When I run `wp search-replace example.com example.net --skip-columns=option_value --export`
2431
Then STDOUT should contain:
2532
"""
26-
INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES
33+
INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES
2734
('1', 'siteurl', 'http://example.com', 'yes'),
2835
"""
2936

3037
When I run `wp search-replace example.com example.net --skip-columns=option_value --export --export_insert_size=1`
3138
Then STDOUT should contain:
3239
"""
3340
('1', 'siteurl', 'http://example.com', 'yes');
34-
INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES
41+
INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES
3542
"""
36-
43+
3744
When I run `wp search-replace foo bar --export | tail -n 1`
3845
Then STDOUT should not contain:
3946
"""

features/search-replace.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Feature: Do global search/replace
99
guid
1010
"""
1111

12+
When I run `wp search-replace foo bar --skip-tables=wp_posts`
13+
Then STDOUT should not contain:
14+
"""
15+
wp_posts
16+
"""
17+
1218
When I run `wp search-replace foo bar --skip-columns=guid`
1319
Then STDOUT should not contain:
1420
"""

0 commit comments

Comments
 (0)