Ticket #8248: 8248.diff
File 8248.diff, 1.5 KB (added by , 5 years ago) |
---|
-
define-constants.php
24 24 define( 'WP_TESTS_DIR', getenv( 'WP_TESTS_DIR' ) ); 25 25 define( 'WP_ROOT_DIR', WP_TESTS_DIR ); 26 26 } else { 27 // Support WP_DEVELOP_DIR, as used by some plugins 27 // Support WP_DEVELOP_DIR, as used by some plugins. 28 28 if ( false !== getenv( 'WP_DEVELOP_DIR' ) ) { 29 29 define( 'WP_ROOT_DIR', getenv( 'WP_DEVELOP_DIR' ) ); 30 30 } else { … … 34 34 define( 'WP_TESTS_DIR', WP_ROOT_DIR . '/tests/phpunit' ); 35 35 } 36 36 37 // Based on the tests directory, look for a config file 37 // Based on the tests directory, look for a config file. 38 38 if ( file_exists( WP_ROOT_DIR . '/wp-tests-config.php' ) ) { 39 // Standard develop.svn.wordpress.org setup 39 // Standard develop.svn.wordpress.org setup. 40 40 define( 'WP_TESTS_CONFIG_PATH', WP_ROOT_DIR . '/wp-tests-config.php' ); 41 41 42 42 } elseif ( file_exists( WP_TESTS_DIR . '/wp-tests-config.php' ) ) { 43 // Legacy unit-test.svn.wordpress.org setup 43 // Legacy unit-test.svn.wordpress.org setup. 44 44 define( 'WP_TESTS_CONFIG_PATH', WP_TESTS_DIR . '/wp-tests-config.php' ); 45 45 46 46 } elseif ( file_exists( dirname( dirname( WP_TESTS_DIR ) ) . '/wp-tests-config.php' ) ) { 47 47 // Environment variable exists and points to tests/phpunit of 48 // develop.svn.wordpress.org setup 48 // develop.svn.wordpress.org setup. 49 49 define( 'WP_TESTS_CONFIG_PATH', dirname( dirname( WP_TESTS_DIR ) ) . '/wp-tests-config.php' ); 50 50 51 51 } else {