Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions features/install-wp-tests.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ Feature: Scaffold install-wp-tests.sh tests
"""
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
And save STDOUT as {PHPUNIT_PHAR_URL}
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
And I run `chmod +x phpunit`
And I run `curl -sS -L --fail -o phpunit {PHPUNIT_PHAR_URL}`
And I run `wp plugin path`
And save STDOUT as {PLUGIN_DIR}
And I run `wp scaffold plugin hello-world`
Expand Down Expand Up @@ -108,7 +107,7 @@ Feature: Scaffold install-wp-tests.sh tests
When I run `composer install --no-interaction --working-dir=polyfills --quiet`
Then the return code should be 0

When I run `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_TESTS_PHPUNIT_POLYFILLS_PATH={RUN_DIR}/polyfills/vendor/yoast/phpunit-polyfills ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
When I run `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_TESTS_PHPUNIT_POLYFILLS_PATH={RUN_DIR}/polyfills/vendor/yoast/phpunit-polyfills php phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
Then the return code should be 0

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`
Expand Down Expand Up @@ -164,8 +163,7 @@ Feature: Scaffold install-wp-tests.sh tests
"""
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
And save STDOUT as {PHPUNIT_PHAR_URL}
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
And I run `chmod +x phpunit`
And I run `curl -sS --fail -L -o phpunit {PHPUNIT_PHAR_URL}`
And I run `wp plugin path`
And save STDOUT as {PLUGIN_DIR}
And I run `wp scaffold plugin hello-world`
Expand Down Expand Up @@ -227,7 +225,7 @@ Feature: Scaffold install-wp-tests.sh tests
When I run `composer install --no-interaction --working-dir=polyfills --quiet`
Then the return code should be 0

When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_TESTS_PHPUNIT_POLYFILLS_PATH={RUN_DIR}/polyfills/vendor/yoast/phpunit-polyfills ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_TESTS_PHPUNIT_POLYFILLS_PATH={RUN_DIR}/polyfills/vendor/yoast/phpunit-polyfills php phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
Then the return code should be 1
And STDOUT should contain:
"""
Expand Down Expand Up @@ -295,8 +293,7 @@ Feature: Scaffold install-wp-tests.sh tests
"""
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
And save STDOUT as {PHPUNIT_PHAR_URL}
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
And I run `chmod +x phpunit`
And I run `curl -sS -L --fail -o phpunit {PHPUNIT_PHAR_URL}`
And I run `wp plugin path`
And save STDOUT as {PLUGIN_DIR}
And I run `wp scaffold plugin hello-world`
Expand Down Expand Up @@ -358,7 +355,7 @@ Feature: Scaffold install-wp-tests.sh tests
When I run `composer install --no-interaction --working-dir=polyfills --quiet`
Then the return code should be 0

When I run `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_TESTS_PHPUNIT_POLYFILLS_PATH={RUN_DIR}/polyfills/vendor/yoast/phpunit-polyfills ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
When I run `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib WP_TESTS_PHPUNIT_POLYFILLS_PATH={RUN_DIR}/polyfills/vendor/yoast/phpunit-polyfills php phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
Then the return code should be 0

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`
Expand Down Expand Up @@ -406,8 +403,7 @@ Feature: Scaffold install-wp-tests.sh tests
"""
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
And save STDOUT as {PHPUNIT_PHAR_URL}
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
And I run `chmod +x phpunit`
And I run `curl -sS -f -L -o phpunit {PHPUNIT_PHAR_URL}`
And I run `wp plugin path`
And save STDOUT as {PLUGIN_DIR}
And I run `wp scaffold plugin hello-world`
Expand Down Expand Up @@ -482,7 +478,7 @@ Feature: Scaffold install-wp-tests.sh tests
When I run `composer install --no-interaction --quiet --working-dir={RUN_DIR}/wordpress-tests-lib`
Then the return code should be 0

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`
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 php phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
Then the return code should be 0

@require-mysql
Expand Down