@@ -6,59 +6,59 @@ Feature: Export a WordPress database
66 When I run `wp db export --porcelain`
77 Then STDOUT should contain:
88 """
9- wp_cli_test -
9+ {DB_NAME} -
1010 """
11- And the wp_cli_test .sql file should not exist
11+ And the {DB_NAME} .sql file should not exist
1212
1313 Scenario : Database export to a specified file path
1414 Given a WP install
1515
16- When I run `wp db export wp_cli_test .sql --porcelain`
16+ When I run `wp db export {DB_NAME} .sql --porcelain`
1717 Then STDOUT should contain:
1818 """
19- wp_cli_test .sql
19+ {DB_NAME} .sql
2020 """
21- And the wp_cli_test .sql file should exist
21+ And the {DB_NAME} .sql file should exist
2222
2323 @skip-sqlite
2424 Scenario : Exclude tables when exporting the database
2525 Given a WP install
2626
27- When I try `wp db export wp_cli_test .sql --exclude_tables=wp_users --porcelain`
28- Then the wp_cli_test .sql file should exist
29- And the contents of the wp_cli_test .sql file should not match /CREATE TABLE ["`]?wp_users[" `]?/
30- And the contents of the wp_cli_test .sql file should match /CREATE TABLE ["`]?wp_options[" `]?/
27+ When I try `wp db export {DB_NAME} .sql --exclude_tables=wp_users --porcelain`
28+ Then the {DB_NAME} .sql file should exist
29+ And the contents of the {DB_NAME} .sql file should not match /CREATE TABLE ["`]?wp_users[" `]?/
30+ And the contents of the {DB_NAME} .sql file should match /CREATE TABLE ["`]?wp_options[" `]?/
3131
3232 @skip-sqlite
3333 Scenario : Include only specific tables when exporting the database
3434 Given a WP install
3535
36- When I try `wp db export wp_cli_test .sql --tables=wp_users --porcelain`
37- Then the wp_cli_test .sql file should exist
38- And the contents of the wp_cli_test .sql file should match /CREATE TABLE ["`]?wp_users[" `]?/
39- And the contents of the wp_cli_test .sql file should not match /CREATE TABLE ["`]?wp_posts[" `]?/
40- And the contents of the wp_cli_test .sql file should not match /CREATE TABLE ["`]?wp_options[" `]?/
36+ When I try `wp db export {DB_NAME} .sql --tables=wp_users --porcelain`
37+ Then the {DB_NAME} .sql file should exist
38+ And the contents of the {DB_NAME} .sql file should match /CREATE TABLE ["`]?wp_users[" `]?/
39+ And the contents of the {DB_NAME} .sql file should not match /CREATE TABLE ["`]?wp_posts[" `]?/
40+ And the contents of the {DB_NAME} .sql file should not match /CREATE TABLE ["`]?wp_options[" `]?/
4141
4242 @require-sqlite
4343 Scenario : Exclude tables when exporting the database
4444 Given a WP install
4545
46- When I try `wp db export wp_cli_test .sql --exclude_tables=wp_users --porcelain`
47- Then the wp_cli_test .sql file should exist
48- And the contents of the wp_cli_test .sql file should not match /_mysql_data_types_cache/
49- And the contents of the wp_cli_test .sql file should not match /CREATE TABLE ["`]?wp_users[" `]?/
50- And the contents of the wp_cli_test .sql file should match /CREATE TABLE ["`]?wp_options[" `]?/
46+ When I try `wp db export {DB_NAME} .sql --exclude_tables=wp_users --porcelain`
47+ Then the {DB_NAME} .sql file should exist
48+ And the contents of the {DB_NAME} .sql file should not match /_mysql_data_types_cache/
49+ And the contents of the {DB_NAME} .sql file should not match /CREATE TABLE ["`]?wp_users[" `]?/
50+ And the contents of the {DB_NAME} .sql file should match /CREATE TABLE ["`]?wp_options[" `]?/
5151
5252 @require-sqlite
5353 Scenario : Include only specific tables when exporting the database
5454 Given a WP install
5555
56- When I try `wp db export wp_cli_test .sql --tables=wp_users --porcelain`
57- Then the wp_cli_test .sql file should exist
58- And the contents of the wp_cli_test .sql file should not match /_mysql_data_types_cache/
59- And the contents of the wp_cli_test .sql file should match /CREATE TABLE ["`]?wp_users[" `]?/
60- And the contents of the wp_cli_test .sql file should not match /CREATE TABLE ["`]?wp_posts[" `]?/
61- And the contents of the wp_cli_test .sql file should not match /CREATE TABLE ["`]?wp_options[" `]?/
56+ When I try `wp db export {DB_NAME} .sql --tables=wp_users --porcelain`
57+ Then the {DB_NAME} .sql file should exist
58+ And the contents of the {DB_NAME} .sql file should not match /_mysql_data_types_cache/
59+ And the contents of the {DB_NAME} .sql file should match /CREATE TABLE ["`]?wp_users[" `]?/
60+ And the contents of the {DB_NAME} .sql file should not match /CREATE TABLE ["`]?wp_posts[" `]?/
61+ And the contents of the {DB_NAME} .sql file should not match /CREATE TABLE ["`]?wp_options[" `]?/
6262
6363 @require-sqlite
6464 Scenario : Export database to STDOUT
@@ -180,10 +180,10 @@ Feature: Export a WordPress database
180180 Scenario : Export database when PHP exec() is disabled
181181 Given a WP install
182182
183- When I try `{INVOKE_WP_CLI_WITH_PHP_ARGS--ddisable_functions=exec} db export wp_cli_test .sql --porcelain`
183+ When I try `{INVOKE_WP_CLI_WITH_PHP_ARGS--ddisable_functions=exec} db export {DB_NAME} .sql --porcelain`
184184 Then the return code should be 0
185185 And STDOUT should contain:
186186 """
187- wp_cli_test .sql
187+ {DB_NAME} .sql
188188 """
189- And the wp_cli_test .sql file should exist
189+ And the {DB_NAME} .sql file should exist
0 commit comments