Changeset 25165 for trunk/tests/phpunit/includes/bootstrap.php
- Timestamp:
- 08/29/2013 06:39:34 PM (12 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 1 added
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/bootstrap.php
r25145 r25165 5 5 6 6 7 $config_file_path = dirname( __FILE__ ) . '/../wp-tests-config.php'; 8 if ( ! file_exists( $config_file_path ) ) { 9 // Support having the config file one level up. 10 $config_file_path = dirname( __FILE__ ) . '/../../wp-tests-config.php'; 7 $config_file_path = dirname( dirname( __FILE__ ) ); 8 if ( ! file_exists( $config_file_path . '/wp-tests-config.php' ) ) { 9 // Support the config file from the root of the develop repository. 10 if ( basename( $config_file_path ) === 'phpunit' && basename( dirname( $config_file_path ) ) === 'tests' ) 11 $config_file_path = dirname( dirname( $config_file_path ) ); 11 12 } 13 $config_file_path .= '/wp-tests-config.php'; 12 14 13 15 /* 14 16 * Globalize some WordPress variables, because PHPUnit loads this file inside a function 15 17 * See: https://github.com/sebastianbergmann/phpunit/issues/325 16 * 17 * These are not needed for WordPress 3.3+, only for older versions 18 */ 19 global $table_prefix, $wp_embed, $wp_locale, $_wp_deprecated_widgets_callbacks, $wp_widget_factory; 20 21 // These are still needed 18 */ 22 19 global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer; 23 20
Note: See TracChangeset
for help on using the changeset viewer.