@@ -3,37 +3,37 @@ Feature: Import a WordPress database
33 Scenario : Import from database name path by default
44 Given a WP install
55
6- When I run `wp db export wp_cli_test .sql`
7- Then the wp_cli_test .sql file should exist
6+ When I run `wp db export {DB_NAME} .sql`
7+ Then the {DB_NAME} .sql file should exist
88
99 When I run `wp db import`
1010 Then STDOUT should be:
1111 """
12- Success: Imported from 'wp_cli_test .sql'.
12+ Success: Imported from '{DB_NAME} .sql'.
1313 """
1414
1515 Scenario : Import from database name path by default with mysql defaults
1616 Given a WP install
1717
18- When I run `wp db export wp_cli_test .sql`
19- Then the wp_cli_test .sql file should exist
18+ When I run `wp db export {DB_NAME} .sql`
19+ Then the {DB_NAME} .sql file should exist
2020
2121 When I run `wp db import --defaults`
2222 Then STDOUT should be:
2323 """
24- Success: Imported from 'wp_cli_test .sql'.
24+ Success: Imported from '{DB_NAME} .sql'.
2525 """
2626
2727 Scenario : Import from database name path by default with --no-defaults
2828 Given a WP install
2929
30- When I run `wp db export wp_cli_test .sql`
31- Then the wp_cli_test .sql file should exist
30+ When I run `wp db export {DB_NAME} .sql`
31+ Then the {DB_NAME} .sql file should exist
3232
3333 When I run `wp db import --no-defaults`
3434 Then STDOUT should be:
3535 """
36- Success: Imported from 'wp_cli_test .sql'.
36+ Success: Imported from '{DB_NAME} .sql'.
3737 """
3838
3939 @require-mysql-or-mariadb
@@ -60,30 +60,30 @@ Feature: Import a WordPress database
6060 Scenario : Import from database name path by default and skip speed optimization
6161 Given a WP install
6262
63- When I run `wp db export wp_cli_test .sql`
64- Then the wp_cli_test .sql file should exist
63+ When I run `wp db export {DB_NAME} .sql`
64+ Then the {DB_NAME} .sql file should exist
6565
6666 When I run `wp db import --skip-optimization`
6767 Then STDOUT should be:
6868 """
69- Success: Imported from 'wp_cli_test .sql'.
69+ Success: Imported from '{DB_NAME} .sql'.
7070 """
7171
7272 # SQLite doesn't support the --dbuser flag.
7373 @require-mysql-or-mariadb
7474 Scenario : Import from database name path by default with passed-in dbuser/dbpass
7575 Given a WP install
7676
77- When I run `wp db export wp_cli_test .sql`
78- Then the wp_cli_test .sql file should exist
77+ When I run `wp db export {DB_NAME} .sql`
78+ Then the {DB_NAME} .sql file should exist
7979
80- When I run `wp db import --dbuser=wp_cli_test --dbpass=password1`
80+ When I run `wp db import --dbuser={DB_USER} --dbpass=password1`
8181 Then STDOUT should be:
8282 """
83- Success: Imported from 'wp_cli_test .sql'.
83+ Success: Imported from '{DB_NAME} .sql'.
8484 """
8585
86- When I try `wp db import --dbuser=wp_cli_test --dbpass=no_such_pass`
86+ When I try `wp db import --dbuser={DB_USER} --dbpass=no_such_pass`
8787 Then the return code should not be 0
8888 And STDERR should contain:
8989 """
@@ -116,10 +116,10 @@ Feature: Import a WordPress database
116116 Scenario : Import forwards the --ssl flag to the MySQL client
117117 Given a WP install
118118
119- When I run `wp db export wp_cli_test .sql`
120- Then the wp_cli_test .sql file should exist
119+ When I run `wp db export {DB_NAME} .sql`
120+ Then the {DB_NAME} .sql file should exist
121121
122- When I try `wp db import wp_cli_test .sql --ssl --debug`
122+ When I try `wp db import {DB_NAME} .sql --ssl --debug`
123123 Then STDERR should contain:
124124 """
125125 --ssl
@@ -170,8 +170,8 @@ Feature: Import a WordPress database
170170 Scenario : MySQL defaults are available as appropriate with --defaults flag
171171 Given a WP install
172172
173- When I run `wp db export wp_cli_test .sql`
174- Then the wp_cli_test .sql file should exist
173+ When I run `wp db export {DB_NAME} .sql`
174+ Then the {DB_NAME} .sql file should exist
175175
176176 When I try `wp db import --defaults --debug`
177177 Then STDERR should match #Debug \(db\): Running shell command: /([^/]+/)+(mysql|mariadb) --no-auto-rehash#
@@ -194,9 +194,9 @@ Feature: Import a WordPress database
194194 🍣
195195 """
196196
197- When I try `wp db export wp_cli_test .sql --debug`
197+ When I try `wp db export {DB_NAME} .sql --debug`
198198 Then the return code should be 0
199- And the wp_cli_test .sql file should exist
199+ And the {DB_NAME} .sql file should exist
200200 And STDERR should contain:
201201 """
202202 Detected character set of the posts table: utf8mb4
@@ -206,10 +206,10 @@ Feature: Import a WordPress database
206206 Setting missing default character set to utf8mb4
207207 """
208208
209- When I run `wp db import --dbuser=wp_cli_test --dbpass=password1`
209+ When I run `wp db import --dbuser={DB_USER} --dbpass=password1`
210210 Then STDOUT should be:
211211 """
212- Success: Imported from 'wp_cli_test .sql'.
212+ Success: Imported from '{DB_NAME} .sql'.
213213 """
214214
215215 When I run `wp post list`
@@ -231,14 +231,14 @@ Feature: Import a WordPress database
231231 🍣
232232 """
233233
234- When I try `wp db export wp_cli_test .sql --debug`
234+ When I try `wp db export {DB_NAME} .sql --debug`
235235 Then the return code should be 0
236- And the wp_cli_test .sql file should exist
236+ And the {DB_NAME} .sql file should exist
237237
238- When I run `wp db import --dbuser=wp_cli_test --dbpass=password1`
238+ When I run `wp db import --dbuser={DB_USER} --dbpass=password1`
239239 Then STDOUT should be:
240240 """
241- Success: Imported from 'wp_cli_test .sql'.
241+ Success: Imported from '{DB_NAME} .sql'.
242242 """
243243
244244 When I run `wp post list`
@@ -316,14 +316,14 @@ Feature: Import a WordPress database
316316 Scenario : `wp db import` adapts the SQL mode via --init-command by default
317317 Given a WP install
318318
319- When I run `wp db export wp_cli_test .sql`
320- Then the wp_cli_test .sql file should exist
319+ When I run `wp db export {DB_NAME} .sql`
320+ Then the {DB_NAME} .sql file should exist
321321
322322 # The WordPress-compatibility mode adaptation runs on the same import
323323 # connection via --init-command, so it is visible in the debug output and no
324324 # separate mode probe runs (which is what used to break with custom connection
325325 # options).
326- When I try `wp db import wp_cli_test .sql --debug`
326+ When I try `wp db import {DB_NAME} .sql --debug`
327327 Then the return code should be 0
328328 And STDERR should contain:
329329 """
@@ -338,10 +338,10 @@ Feature: Import a WordPress database
338338 Scenario : `wp db import --skip-sql-mode-compat` imports under the server's own SQL modes
339339 Given a WP install
340340
341- When I run `wp db export wp_cli_test .sql`
342- Then the wp_cli_test .sql file should exist
341+ When I run `wp db export {DB_NAME} .sql`
342+ Then the {DB_NAME} .sql file should exist
343343
344- When I try `wp db import wp_cli_test .sql --skip-sql-mode-compat --debug`
344+ When I try `wp db import {DB_NAME} .sql --skip-sql-mode-compat --debug`
345345 Then the return code should be 0
346346 And STDERR should not contain:
347347 """
0 commit comments