Skip to content

Commit 8bbab06

Browse files
committed
Adapt tests for PHP 8.0+
1 parent 09254cd commit 8bbab06

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

features/install-wp-tests.feature

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Feature: Scaffold install-wp-tests.sh tests
1414
"""
1515
And the return code should be 1
1616

17-
@require-php-5.6 @less-than-php-8.0
17+
@less-than-php-8.0
1818
Scenario: Install latest version of WordPress
1919
Given a WP install
2020
And a affirmative-response file:
@@ -221,7 +221,13 @@ Feature: Scaffold install-wp-tests.sh tests
221221
wp_cli_test_scaffold
222222
"""
223223
224-
When I try `WP_TESTS_DIR={RUN_DIR}/wordpress-tests-lib ./phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
224+
When I run `mkdir polyfills && composer init --name=test/package --require="yoast/phpunit-polyfills:^1" --no-interaction --quiet --working-dir=polyfills`
225+
Then the return code should be 0
226+
227+
When I run `composer install --no-interaction --working-dir=polyfills --quiet`
228+
Then the return code should be 0
229+
230+
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`
225231
Then the return code should be 1
226232
And STDOUT should contain:
227233
"""

0 commit comments

Comments
 (0)