Changeset 7421
- Timestamp:
- 10/11/2013 06:58:12 PM (12 years ago)
- Location:
- trunk/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/bootstrap.php
r6997 r7421 7 7 } 8 8 9 require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php'; 9 /** 10 * In the pre-develop.svn WP development environment, an environmental bash 11 * variable would be set to run PHP Unit tests. However, this has been done 12 * away with in a post-develop.svn world. We'll still check if this variable 13 * is set for backwards compat. 14 */ 15 if ( getenv( 'WP_TESTS_DIR' ) ) { 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 { 20 define( 'WP_ROOT_DIR', dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) ); 21 define( 'WP_TESTS_DIR', WP_ROOT_DIR . '/tests/phpunit' ); 22 define( 'WP_TESTS_CONFIG_PATH', WP_ROOT_DIR . '/wp-tests-config.php' ); 23 } 24 25 if ( ! file_exists( WP_TESTS_DIR . '/includes/functions.php' ) ) 26 die( 'The WordPress PHPUnit test suite could not be found.' ); 27 28 require_once WP_TESTS_DIR . '/includes/functions.php'; 10 29 11 30 function _install_and_load_buddypress() { … … 14 33 tests_add_filter( 'muplugins_loaded', '_install_and_load_buddypress' ); 15 34 16 require getenv( 'WP_TESTS_DIR' ). '/includes/bootstrap.php';35 require WP_TESTS_DIR . '/includes/bootstrap.php'; 17 36 18 37 // Load the BP-specific testing tools -
trunk/tests/includes/install.php
r7187 r7421 9 9 10 10 $config_file_path = $argv[1]; 11 $multisite = ! empty( $argv[2] ); 11 $tests_dir_path = $argv[2]; 12 $multisite = ! empty( $argv[3] ); 12 13 13 14 require_once $config_file_path; 14 require_once dirname( $config_file_path ). '/includes/functions.php';15 require_once $tests_dir_path . '/includes/functions.php'; 15 16 16 17 function _load_buddypress() { -
trunk/tests/includes/loader.php
r6905 r7421 1 1 <?php 2 3 // Install BP4 $config_file_path = getenv( 'WP_TESTS_DIR' ) . '/wp-tests-config.php';5 2 $multisite = (int) ( defined( 'WP_TESTS_MULTISITE') && WP_TESTS_MULTISITE ); 6 system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( $config_file_path) . ' ' . $multisite );3 system( WP_PHP_BINARY . ' ' . escapeshellarg( dirname( __FILE__ ) . '/install.php' ) . ' ' . escapeshellarg( WP_TESTS_CONFIG_PATH ) . ' ' . escapeshellarg( WP_TESTS_DIR ) . ' ' . $multisite ); 7 4 8 5 // Bootstrap BP
Note: See TracChangeset
for help on using the changeset viewer.