Skip to content

Commit 5563dd9

Browse files
committed
Adapt theme tests to include separate test install
1 parent 4950563 commit 5563dd9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

features/scaffold-theme-tests.feature

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,11 @@ Feature: Scaffold theme unit tests
9090
"""
9191
# This throws a warning for the password provided via command line.
9292
And I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
93-
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
94-
And I try `rm -fr /tmp/behat-wordpress`
95-
And I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress {THEME_DIR}/p2child/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest`
93+
94+
And I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress {THEME_DIR}/p2child/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest`
9695
Then the return code should be 0
9796

98-
When I run `cd {THEME_DIR}/p2child; WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib phpunit`
97+
When I run `cd {THEME_DIR}/p2child; WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib phpunit`
9998
Then STDOUT should contain:
10099
"""
101100
p2child/functions.php loaded.
@@ -109,7 +108,7 @@ Feature: Scaffold theme unit tests
109108
No tests executed!
110109
"""
111110

112-
When I run `cd {THEME_DIR}/p2child; WP_MULTISITE=1 WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib phpunit`
111+
When I run `cd {THEME_DIR}/p2child; WP_MULTISITE=1 WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib phpunit`
113112
Then STDOUT should contain:
114113
"""
115114
p2child/functions.php loaded.

0 commit comments

Comments
 (0)