diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php
index b557efd3d9..58cde8e962 100644
|
a
|
b
|
if ( defined( 'WP_TESTS_CONFIG_FILE_PATH' ) ) { |
| 16 | 16 | $config_file_path .= '/wp-tests-config.php'; |
| 17 | 17 | } |
| 18 | 18 | |
| | 19 | if ( defined( 'WP_TESTS_VENDOR_DIR_PATH' ) ) { |
| | 20 | $vendor_dir_path = WP_TESTS_VENDOR_DIR_PATH; |
| | 21 | } else { |
| | 22 | $vendor_dir_path = __DIR__ . '/../../..'; |
| | 23 | } |
| | 24 | |
| 19 | 25 | /* |
| 20 | 26 | * Globalize some WordPress variables, because PHPUnit loads this file inside a function. |
| 21 | 27 | * See: https://github.com/sebastianbergmann/phpunit/issues/325 |
| … |
… |
require_once __DIR__ . '/class-mockobject-autoload.php'; |
| 51 | 57 | spl_autoload_register( 'MockObject_Autoload::load', true, true ); |
| 52 | 58 | |
| 53 | 59 | // Check that the PHPUnit Polyfills autoloader exists. |
| 54 | | $phpunit_polyfills_autoloader = __DIR__ . '/../../../vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php'; |
| | 60 | $phpunit_polyfills_autoloader = $vendor_dir_path . '/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php'; |
| 55 | 61 | if ( ! file_exists( $phpunit_polyfills_autoloader ) ) { |
| 56 | 62 | echo "Error: You need to run `composer update` before running the tests.\n"; |
| 57 | 63 | echo "You can still use a PHPUnit phar to run them, but the dependencies do need to be installed.\n"; |