Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/11/2013 02:13:00 AM (11 years ago)
Author:
boonebgorges
Message:

Improves test suite async installation process, for more flexible WP_TESTS_DIR paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/includes/install.php

    r6905 r6908  
    1414require_once dirname( $config_file_path ) . '/includes/functions.php';
    1515
    16 // Set BP to be an active plugin
    17 $GLOBALS['wp_tests_options'] = array(
    18     'active_plugins' => 'buddypress/bp-loader.php',
    19 );
     16function _load_buddypress() {
     17    require dirname( dirname( dirname( __FILE__ ) ) ) . '/bp-loader.php';
     18}
     19tests_add_filter( 'muplugins_loaded', '_load_buddypress' );
     20
     21define( 'BP_PLUGIN_DIR', dirname( dirname( dirname( __FILE__ ) ) ) . '/' );
    2022define( 'BP_ROOT_BLOG', 1 );
    2123
    2224// Always load admin bar
    2325tests_add_filter( 'show_admin_bar', '__return_true' );
    24 
    25 function wp_tests_options( $value ) {
    26     $key = substr( current_filter(), strlen( 'pre_option_' ) );
    27     return $GLOBALS['wp_tests_options'][$key];
    28 }
    29 foreach ( array_keys( $GLOBALS['wp_tests_options'] ) as $key ) {
    30     tests_add_filter( 'pre_option_'.$key, 'wp_tests_options' );
    31 }
    3226
    3327function wp_test_bp_install( $value ) {
Note: See TracChangeset for help on using the changeset viewer.