Changeset 48592
- Timestamp:
- 07/23/2020 11:26:50 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/bootstrap.php
r48532 r48592 38 38 require_once __DIR__ . '/functions.php'; 39 39 40 if ( version_compare( tests_get_phpunit_version(), '5.4', '<' ) || version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) { 40 $phpunit_version = tests_get_phpunit_version(); 41 42 if ( version_compare( $phpunit_version, '5.4', '<' ) || version_compare( $phpunit_version, '8.0', '>=' ) ) { 41 43 printf( 42 44 "Error: Looks like you're using PHPUnit %s. WordPress requires at least PHPUnit 5.4 and is currently only compatible with PHPUnit up to 7.x.\n", 43 tests_get_phpunit_version()45 $phpunit_version 44 46 ); 45 47 echo "Please use the latest PHPUnit version from the 7.x branch.\n"; … … 50 52 echo "Error: The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.\n"; 51 53 exit( 1 ); 54 } 55 56 $required_constants = array( 57 'WP_TESTS_DOMAIN', 58 'WP_TESTS_EMAIL', 59 'WP_TESTS_TITLE', 60 'WP_PHP_BINARY', 61 ); 62 63 foreach ( $required_constants as $constant ) { 64 if ( ! defined( $constant ) ) { 65 printf( 66 "Error: The required %s constant is not defined. Check out `wp-tests-config-sample.php` for an example.\n", 67 $constant 68 ); 69 exit( 1 ); 70 } 52 71 } 53 72
Note: See TracChangeset
for help on using the changeset viewer.