Skip to content

Commit 8d22d2e

Browse files
authored
Merge pull request #297 from wp-cli/fix/trunk-composer-update-requirement
Fix testing on WP trunk
2 parents 70b57ba + d5342ed commit 8d22d2e

File tree

3 files changed

+45
-161
lines changed

3 files changed

+45
-161
lines changed

features/install-wp-tests.feature

Lines changed: 35 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,24 @@ Feature: Scaffold install-wp-tests.sh tests
5050
And I run `wp plugin path`
5151
And save STDOUT as {PLUGIN_DIR}
5252
And I run `wp scaffold plugin hello-world`
53-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
5453
# This throws a warning for the password provided via command line.
5554
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"`
56-
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
57-
And I try `rm -fr /tmp/behat-wordpress`
5855

59-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest`
56+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest`
6057
Then the return code should be 0
61-
And the /tmp/behat-wordpress-tests-lib directory should contain:
58+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
6259
"""
6360
data
6461
"""
65-
And the /tmp/behat-wordpress-tests-lib directory should contain:
62+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
6663
"""
6764
includes
6865
"""
69-
And the /tmp/behat-wordpress-tests-lib directory should contain:
66+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
7067
"""
7168
wp-tests-config.php
7269
"""
73-
And the /tmp/behat-wordpress directory should contain:
70+
And the {RUN_DIR}/wordpress directory should contain:
7471
"""
7572
index.php
7673
license.txt
@@ -98,18 +95,17 @@ Feature: Scaffold install-wp-tests.sh tests
9895
install_test_suite
9996
"""
10097

101-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
10298
# This throws a warning for the password provided via command line.
10399
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
104100
And STDOUT should contain:
105101
"""
106102
wp_cli_test_scaffold
107103
"""
108104

109-
When I run `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
105+
When I run `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
110106
Then the return code should be 0
111107

112-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest < affirmative-response`
108+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest < affirmative-response`
113109
Then the return code should be 0
114110
And STDERR should contain:
115111
"""
@@ -120,7 +116,7 @@ Feature: Scaffold install-wp-tests.sh tests
120116
Recreated the database (wp_cli_test_scaffold)
121117
"""
122118
123-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest < negative-response`
119+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest < negative-response`
124120
Then the return code should be 0
125121
And STDERR should contain:
126122
"""
@@ -167,27 +163,24 @@ Feature: Scaffold install-wp-tests.sh tests
167163
And I run `wp plugin path`
168164
And save STDOUT as {PLUGIN_DIR}
169165
And I run `wp scaffold plugin hello-world`
170-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
171166
# This throws a warning for the password provided via command line.
172167
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"`
173-
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
174-
And I try `rm -fr /tmp/behat-wordpress`
175168
176-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest`
169+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest`
177170
Then the return code should be 0
178-
And the /tmp/behat-wordpress-tests-lib directory should contain:
171+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
179172
"""
180173
data
181174
"""
182-
And the /tmp/behat-wordpress-tests-lib directory should contain:
175+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
183176
"""
184177
includes
185178
"""
186-
And the /tmp/behat-wordpress-tests-lib directory should contain:
179+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
187180
"""
188181
wp-tests-config.php
189182
"""
190-
And the /tmp/behat-wordpress directory should contain:
183+
And the {RUN_DIR}/wordpress directory should contain:
191184
"""
192185
index.php
193186
license.txt
@@ -215,22 +208,21 @@ Feature: Scaffold install-wp-tests.sh tests
215208
install_test_suite
216209
"""
217210
218-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
219211
# This throws a warning for the password provided via command line.
220212
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
221213
And STDOUT should contain:
222214
"""
223215
wp_cli_test_scaffold
224216
"""
225217
226-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
218+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
227219
Then the return code should be 1
228220
And STDOUT should contain:
229221
"""
230-
The scaffolded tests cannot currently be run on PHP 8.0+. See https://github.com/wp-cli/scaffold-command/issues/285
222+
Looks like you're using PHPUnit 9.5.8. WordPress requires at least PHPUnit 5.4 and is currently only compatible with PHPUnit up to 7.x.
231223
"""
232224
233-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest < affirmative-response`
225+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest < affirmative-response`
234226
Then the return code should be 0
235227
And STDERR should contain:
236228
"""
@@ -241,7 +233,7 @@ Feature: Scaffold install-wp-tests.sh tests
241233
Recreated the database (wp_cli_test_scaffold)
242234
"""
243235
244-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest < negative-response`
236+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest < negative-response`
245237
Then the return code should be 0
246238
And STDERR should contain:
247239
"""
@@ -252,7 +244,6 @@ Feature: Scaffold install-wp-tests.sh tests
252244
Leaving the existing database (wp_cli_test_scaffold) in place
253245
"""
254246
255-
@require-php-5.6 @less-than-php-8.0
256247
Scenario: Install WordPress from trunk
257248
Given a WP install
258249
And a get-phpunit-phar-url.php file:
@@ -280,42 +271,39 @@ Feature: Scaffold install-wp-tests.sh tests
280271
And I run `wp plugin path`
281272
And save STDOUT as {PLUGIN_DIR}
282273
And I run `wp scaffold plugin hello-world`
283-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
284274
# This throws a warning for the password provided via command line.
285275
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"`
286-
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
287-
And I try `rm -fr /tmp/behat-wordpress`
288276
289-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} trunk`
277+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} trunk`
290278
Then the return code should be 0
291-
And the /tmp/behat-wordpress-tests-lib directory should contain:
279+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
292280
"""
293281
data
294282
"""
295-
And the /tmp/behat-wordpress-tests-lib directory should contain:
283+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
296284
"""
297285
includes
298286
"""
299-
And the /tmp/behat-wordpress-tests-lib directory should contain:
287+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
300288
"""
301289
wp-tests-config.php
302290
"""
303-
And the /tmp/behat-wordpress directory should contain:
291+
And the {RUN_DIR}/wordpress directory should contain:
304292
"""
305293
index.php
306294
"""
307295
308296
# WP 5.0+: js
309297
310-
And the /tmp/behat-wordpress directory should contain:
298+
And the {RUN_DIR}/wordpress directory should contain:
311299
"""
312300
license.txt
313301
readme.html
314302
"""
315303
316304
# WP 5.0+: styles
317305
318-
And the /tmp/behat-wordpress directory should contain:
306+
And the {RUN_DIR}/wordpress directory should contain:
319307
"""
320308
wp-activate.php
321309
wp-admin
@@ -334,154 +322,52 @@ Feature: Scaffold install-wp-tests.sh tests
334322
wp-trackback.php
335323
xmlrpc.php
336324
"""
337-
And the contents of the /tmp/behat-wordpress/wp-includes/version.php file should match /\-(alpha|beta[0-9]+|RC[0-9]+)\-/
325+
And the contents of the {RUN_DIR}/wordpress/wp-includes/version.php file should match /\-(alpha|beta[0-9]+|RC[0-9]+)\-/
338326
And the {PLUGIN_DIR}/hello-world/phpunit.xml.dist file should exist
339327
And STDERR should contain:
340328
"""
341329
install_test_suite
342330
"""
343331
344-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
345332
# This throws a warning for the password provided via command line.
346333
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
347334
And STDOUT should contain:
348335
"""
349336
wp_cli_test_scaffold
350337
"""
351338
352-
When I run `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
339+
When I run `composer init --no-interaction --quiet --name=wp-cli/test-scenario --require="yoast/phpunit-polyfills=^1.0.1" --working-dir={RUN_DIR}/wordpress-tests-lib`
353340
Then the return code should be 0
354341
355-
@require-php-8.0
356-
Scenario: Install WordPress from trunk for PHP 8.0+
357-
Given a WP install
358-
And a get-phpunit-phar-url.php file:
359-
"""
360-
<?php
361-
$version = 4;
362-
if(PHP_VERSION_ID >= 50600) {
363-
$version = 5;
364-
}
365-
if(PHP_VERSION_ID >= 70000) {
366-
$version = 6;
367-
}
368-
if(PHP_VERSION_ID >= 70100) {
369-
$version = 7;
370-
}
371-
if(PHP_VERSION_ID >= 80000) {
372-
$version = 9;
373-
}
374-
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
375-
"""
376-
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
377-
And save STDOUT as {PHPUNIT_PHAR_URL}
378-
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
379-
And I run `chmod +x phpunit`
380-
And I run `wp plugin path`
381-
And save STDOUT as {PLUGIN_DIR}
382-
And I run `wp scaffold plugin hello-world`
383-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
384-
# This throws a warning for the password provided via command line.
385-
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"`
386-
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
387-
And I try `rm -fr /tmp/behat-wordpress`
388-
389-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} trunk`
342+
When I run `composer install --no-interaction --quiet --working-dir={RUN_DIR}/wordpress-tests-lib`
390343
Then the return code should be 0
391-
And the /tmp/behat-wordpress-tests-lib directory should contain:
392-
"""
393-
data
394-
"""
395-
And the /tmp/behat-wordpress-tests-lib directory should contain:
396-
"""
397-
includes
398-
"""
399-
And the /tmp/behat-wordpress-tests-lib directory should contain:
400-
"""
401-
wp-tests-config.php
402-
"""
403-
And the /tmp/behat-wordpress directory should contain:
404-
"""
405-
index.php
406-
"""
407-
408-
# WP 5.0+: js
409-
410-
And the /tmp/behat-wordpress directory should contain:
411-
"""
412-
license.txt
413-
readme.html
414-
"""
415-
416-
# WP 5.0+: styles
417-
418-
And the /tmp/behat-wordpress directory should contain:
419-
"""
420-
wp-activate.php
421-
wp-admin
422-
wp-blog-header.php
423-
wp-comments-post.php
424-
wp-config-sample.php
425-
wp-content
426-
wp-cron.php
427-
wp-includes
428-
wp-links-opml.php
429-
wp-load.php
430-
wp-login.php
431-
wp-mail.php
432-
wp-settings.php
433-
wp-signup.php
434-
wp-trackback.php
435-
xmlrpc.php
436-
"""
437-
And the contents of the /tmp/behat-wordpress/wp-includes/version.php file should match /\-(alpha|beta[0-9]+|RC[0-9]+)\-/
438-
And the {PLUGIN_DIR}/hello-world/phpunit.xml.dist file should exist
439-
And STDERR should contain:
440-
"""
441-
install_test_suite
442-
"""
443-
444-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
445-
# This throws a warning for the password provided via command line.
446-
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
447-
And STDOUT should contain:
448-
"""
449-
wp_cli_test_scaffold
450-
"""
451344
452-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
453-
Then the return code should be 1
454-
And STDOUT should contain:
455-
"""
456-
The scaffolded tests cannot currently be run on PHP 8.0+. See https://github.com/wp-cli/scaffold-command/issues/285
457-
"""
345+
When I run `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_TESTS_PHPUNIT_POLYFILLS_PATH={RUN_DIR}/wordpress-tests-lib/vendor/yoast/phpunit-polyfills ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
346+
Then the return code should be 0
458347
459348
Scenario: Install WordPress 3.7 and phpunit will not run
460349
Given a WP install
461350
And I run `wp plugin path`
462351
And save STDOUT as {PLUGIN_DIR}
463352
And I run `wp scaffold plugin hello-world`
464-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
465353
# This throws a warning for the password provided via command line.
466354
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"`
467-
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
468-
And I try `rm -fr /tmp/behat-wordpress`
469355
470-
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} 3.7`
356+
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_CORE_DIR={RUN_DIR}/wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} 3.7`
471357
Then the return code should be 0
472-
And the /tmp/behat-wordpress-tests-lib directory should contain:
358+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
473359
"""
474360
data
475361
"""
476-
And the /tmp/behat-wordpress-tests-lib directory should contain:
362+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
477363
"""
478364
includes
479365
"""
480-
And the /tmp/behat-wordpress-tests-lib directory should contain:
366+
And the {RUN_DIR}/wordpress-tests-lib directory should contain:
481367
"""
482368
wp-tests-config.php
483369
"""
484-
And the /tmp/behat-wordpress directory should contain:
370+
And the {RUN_DIR}/wordpress directory should contain:
485371
"""
486372
index.php
487373
license.txt
@@ -503,7 +389,7 @@ Feature: Scaffold install-wp-tests.sh tests
503389
wp-trackback.php
504390
xmlrpc.php
505391
"""
506-
And the /tmp/behat-wordpress/wp-includes/version.php file should contain:
392+
And the {RUN_DIR}/wordpress/wp-includes/version.php file should contain:
507393
"""
508394
3.7
509395
"""
@@ -512,7 +398,6 @@ Feature: Scaffold install-wp-tests.sh tests
512398
install_test_suite
513399
"""
514400
515-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
516401
# This throws a warning for the password provided via command line.
517402
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
518403
And STDOUT should contain:

features/scaffold-theme-tests.feature

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,13 @@ Feature: Scaffold theme unit tests
8888
"""
8989
<?php echo __FILE__ . " loaded.\n";
9090
"""
91-
# TODO: Hardcoded for GHA, needs to be made more flexible for local setups.
9291
# This throws a warning for the password provided via command line.
9392
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"`
94-
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
95-
And I try `rm -fr /tmp/behat-wordpress`
96-
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`
9795
Then the return code should be 0
9896

99-
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`
10098
Then STDOUT should contain:
10199
"""
102100
p2child/functions.php loaded.
@@ -110,7 +108,7 @@ Feature: Scaffold theme unit tests
110108
No tests executed!
111109
"""
112110

113-
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`
114112
Then STDOUT should contain:
115113
"""
116114
p2child/functions.php loaded.

0 commit comments

Comments
 (0)