Changeset 8415
- Timestamp:
- 05/12/2014 08:02:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/define-constants.php
r8376 r8415 12 12 13 13 /** 14 * In the pre-develop.svn WP development environment, an environmental bash 15 * variable would be set to run PHP Unit tests. However, this has been done 16 * away with in a post-develop.svn world. We'll still check if this variable 17 * is set for backwards compat. 14 * Determine where the WP test suite lives. Three options are supported: 15 * 16 * - Define a WP_DEVELOP_DIR environment variable, which points to a checkout 17 * of the develop.svn.wordpress.org repository (this is recommended) 18 * - Define a WP_TESTS_DIR environment variable, which points to a checkout of 19 * WordPress test suite 20 * - Assume that we are inside of a develop.svn.wordpress.org setup, and walk 21 * up the directory tree 18 22 */ 19 if ( getenv( 'WP_TESTS_DIR' ) ) {23 if ( false !== getenv( 'WP_TESTS_DIR' ) ) { 20 24 define( 'WP_TESTS_DIR', getenv( 'WP_TESTS_DIR' ) ); 21 25 define( 'WP_ROOT_DIR', WP_TESTS_DIR ); 22 26 } else { 23 define( 'WP_ROOT_DIR', dirname( dirname( dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) ) ) ); 27 // Support WP_DEVELOP_DIR, as used by some plugins 28 if ( false !== getenv( 'WP_DEVELOP_DIR' ) ) { 29 define( 'WP_TESTS_DIR', getenv( 'WP_DEVELOP_DIR' ) ); 30 } else { 31 define( 'WP_ROOT_DIR', dirname( dirname( dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) ) ) ); 32 } 33 24 34 define( 'WP_TESTS_DIR', WP_ROOT_DIR . '/tests/phpunit' ); 25 35 }
Note: See TracChangeset
for help on using the changeset viewer.