Make WordPress Core


Ignore:
Timestamp:
08/29/2013 06:39:34 PM (12 years ago)
Author:
nacin
Message:

Move PHPUnit tests into a tests/phpunit directory.

wp-tests-config.php can/should reside in the root of a develop checkout. phpunit should be run from the root.

see #25088.

Location:
trunk/tests/phpunit
Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r25145 r25165  
    55
    66
    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__ ) );
     8if ( ! 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 ) );
    1112}
     13$config_file_path .= '/wp-tests-config.php';
    1214
    1315/*
    1416 * Globalize some WordPress variables, because PHPUnit loads this file inside a function
    1517 * 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 */
    2219global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer;
    2320
Note: See TracChangeset for help on using the changeset viewer.