diff --git tests/phpunit/includes/bootstrap.php tests/phpunit/includes/bootstrap.php
index 3ea8eb6636..0d3bd4be96 100644
|
|
if ( class_exists( 'PHPUnit\Runner\Version' ) ) { |
10 | 10 | require_once dirname( __FILE__ ) . '/phpunit6-compat.php'; |
11 | 11 | } |
12 | 12 | |
13 | | $config_file_path = dirname( dirname( __FILE__ ) ); |
14 | | if ( ! file_exists( $config_file_path . '/wp-tests-config.php' ) ) { |
15 | | // Support the config file from the root of the develop repository. |
16 | | if ( basename( $config_file_path ) === 'phpunit' && basename( dirname( $config_file_path ) ) === 'tests' ) { |
17 | | $config_file_path = dirname( dirname( $config_file_path ) ); |
| 13 | if ( defined( 'WP_TESTS_CONFIG_FILE_PATH' ) ) { |
| 14 | $config_file_path = WP_TESTS_CONFIG_FILE_PATH; |
| 15 | } else { |
| 16 | $config_file_path = dirname( dirname( __FILE__ ) ); |
| 17 | if ( ! file_exists( $config_file_path . '/wp-tests-config.php' ) ) { |
| 18 | // Support the config file from the root of the develop repository. |
| 19 | if ( basename( $config_file_path ) === 'phpunit' && basename( dirname( $config_file_path ) ) === 'tests' ) { |
| 20 | $config_file_path = dirname( dirname( $config_file_path ) ); |
| 21 | } |
18 | 22 | } |
| 23 | $config_file_path .= '/wp-tests-config.php'; |
19 | 24 | } |
20 | | $config_file_path .= '/wp-tests-config.php'; |
21 | 25 | |
22 | 26 | /* |
23 | 27 | * Globalize some WordPress variables, because PHPUnit loads this file inside a function |