Changeset 7424
- Timestamp:
- 10/14/2013 11:28:38 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/bootstrap.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/bootstrap.php
r7423 r7424 15 15 if ( getenv( 'WP_TESTS_DIR' ) ) { 16 16 define( 'WP_TESTS_DIR', getenv( 'WP_TESTS_DIR' ) ); 17 define( 'WP_TESTS_CONFIG_PATH', WP_TESTS_DIR . '/wp-tests-config.php' ); 18 } 19 else { 17 define( 'WP_ROOT_DIR', WP_TESTS_DIR ); 18 } else { 20 19 define( 'WP_ROOT_DIR', dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) ); 21 20 define( 'WP_TESTS_DIR', WP_ROOT_DIR . '/tests/phpunit' ); 22 define( 'WP_TESTS_CONFIG_PATH', WP_ROOT_DIR . '/wp-tests-config.php' );23 21 } 24 22 25 if ( ! file_exists( WP_TESTS_DIR . '/includes/functions.php' ) ) 23 // Based on the tests directory, look for a config file 24 if ( file_exists( WP_ROOT_DIR . '/wp-tests-config.php' ) ) { 25 // Standard develop.svn.wordpress.org setup 26 define( 'WP_TESTS_CONFIG_PATH', WP_ROOT_DIR . '/wp-tests-config.php' ); 27 28 } else if ( file_exists( WP_TESTS_DIR . '/wp-tests-config.php' ) ) { 29 // Legacy unit-test.svn.wordpress.org setup 30 define( 'WP_TESTS_CONFIG_PATH', WP_TESTS_DIR . '/wp-tests-config.php' ); 31 32 } else if ( file_exists( dirname( dirname( WP_TESTS_DIR ) ) . '/wp-tests-config.php' ) ) { 33 // Environment variable exists and points to tests/phpunit of 34 // develop.svn.wordpress.org setup 35 define( 'WP_TESTS_CONFIG_PATH', dirname( dirname( WP_TESTS_DIR ) ) . '/wp-tests-config.php' ); 36 37 } else { 38 die( "wp-tests-config.php could not be found.\n" ); 39 } 40 41 if ( ! file_exists( WP_TESTS_DIR . '/includes/functions.php' ) ) { 26 42 die( "The WordPress PHPUnit test suite could not be found.\n" ); 43 } 27 44 28 45 require_once WP_TESTS_DIR . '/includes/functions.php';
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)