Changeset 51581
- Timestamp:
- 08/07/2021 02:45:08 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/bootstrap.php
r51575 r51581 24 24 25 25 if ( ! is_readable( $config_file_path ) ) { 26 echo "Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n";26 echo 'Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.' . PHP_EOL; 27 27 exit( 1 ); 28 28 } … … 32 32 33 33 if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! is_dir( ABSPATH ) ) { 34 echo "Error: The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.\n";34 echo 'Error: The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.' . PHP_EOL; 35 35 exit( 1 ); 36 36 } … … 40 40 if ( version_compare( $phpunit_version, '5.7.21', '<' ) ) { 41 41 printf( 42 "Error: Looks like you're using PHPUnit %s. WordPress requires at least PHPUnit 5.7.21.\n",42 'Error: Looks like you’re using PHPUnit %s. WordPress requires at least PHPUnit 5.7.21.' . PHP_EOL, 43 43 $phpunit_version 44 44 ); 45 echo "Please use the latest PHPUnit version supported for the PHP version you are running the tests on.\n";45 echo 'Please use the latest PHPUnit version supported for the PHP version you are running the tests on.' . PHP_EOL; 46 46 exit( 1 ); 47 47 } … … 50 50 $phpunit_polyfills_autoloader = __DIR__ . '/../../../vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php'; 51 51 if ( ! file_exists( $phpunit_polyfills_autoloader ) ) { 52 echo "Error: You need to run `composer update` before running the tests.\n";53 echo "You can still use a PHPUnit phar to run them, but the dependencies do need to be installed.\n";52 echo 'Error: You need to run `composer update` before running the tests.' . PHP_EOL; 53 echo 'You can still use a PHPUnit phar to run them, but the dependencies do need to be installed.' . PHP_EOL; 54 54 exit( 1 ); 55 55 } … … 70 70 if ( $missing_extensions ) { 71 71 printf( 72 "Error: The following required PHP extensions are missing from the testing environment: %s.\n",72 'Error: The following required PHP extensions are missing from the testing environment: %s.' . PHP_EOL, 73 73 implode( ', ', $missing_extensions ) 74 74 ); 75 echo "Please make sure they are installed and enabled.\n",75 echo 'Please make sure they are installed and enabled.' . PHP_EOL, 76 76 exit( 1 ); 77 77 } … … 94 94 if ( $missing_constants ) { 95 95 printf( 96 "Error: The following required constants are not defined: %s.\n",96 'Error: The following required constants are not defined: %s.' . PHP_EOL, 97 97 implode( ', ', $missing_constants ) 98 98 ); 99 echo "Please check out `wp-tests-config-sample.php` for an example.\n",99 echo 'Please check out `wp-tests-config-sample.php` for an example.' . PHP_EOL, 100 100 exit( 1 ); 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.