Changeset 51811
- Timestamp:
- 09/14/2021 06:40:30 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/bootstrap.php
r51810 r51811 106 106 if ( $phpunit_polyfills_error || ! file_exists( $phpunit_polyfills_autoloader ) ) { 107 107 echo 'Error: The PHPUnit Polyfills library is a requirement for running the WP test suite.' . PHP_EOL; 108 if ( isset( $phpunit_polyfills_path) ) {108 if ( defined( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH' ) ) { 109 109 printf( 110 110 'The PHPUnit Polyfills autoload file was not found in "%s"' . PHP_EOL, … … 112 112 ); 113 113 echo 'Please verify that the file path provided in the WP_TESTS_PHPUNIT_POLYFILLS_PATH constant is correct.' . PHP_EOL; 114 } elseif ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) { 115 echo 'You need to run `composer update` before running the tests.' . PHP_EOL; 116 echo 'Once the dependencies are installed, you can run the tests using the Composer-installed version of PHPUnit or using a PHPUnit phar file, but the dependencies do need to be installed whichever way the tests are run.' . PHP_EOL; 114 117 } else { 115 echo 'You need to run `composer update` before running the tests.' . PHP_EOL; 118 echo 'If you are trying to run plugin/theme integration tests, make sure the PHPUnit Polyfills library is available and either load the autoload file of this library in your own test bootstrap before calling the WP Core test bootstrap file; or set the path to the PHPUnit Polyfills library in a "WP_TESTS_PHPUNIT_POLYFILLS_PATH" constant to allow the WP Core bootstrap to load the Polyfills.' . PHP_EOL . PHP_EOL; 119 echo 'If you are trying to run the WP Core tests, make sure to set the "WP_RUN_CORE_TESTS" constant to 1 and run `composer update` before running the tests.' . PHP_EOL; 116 120 echo 'Once the dependencies are installed, you can run the tests using the Composer-installed version of PHPUnit or using a PHPUnit phar file, but the dependencies do need to be installed whichever way the tests are run.' . PHP_EOL; 117 121 }
Note: See TracChangeset
for help on using the changeset viewer.