Skip to:
Content

BuddyPress.org

Changeset 11096


Ignore:
Timestamp:
09/13/2016 06:45:34 PM (8 years ago)
Author:
djpaul
Message:

Tests: fix plugin activation in PHPUnit bootstrap.

In the bootstrap, we load BuddyPress into the WordPress by including the BuddyPress file directly, hooked to muplugins_loaded.
This has worked well except the standard plugin activation actions that activate_plugins() would usually trigger, aren't called.
BuddyPress hooks to the activation action in bp_activation() to call bp_add_options(), which adds default options and values to the database.

This change calls the required action manually, fixing the PHPUnit environment set-up, required after r11094.

Fixes #7254

File:
1 edited

Legend:

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

    r10470 r11096  
    1818function _load_buddypress() {
    1919    require dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/src/bp-loader.php';
     20    do_action( 'activate_src/bp-loader.php' );
    2021}
    2122tests_add_filter( 'muplugins_loaded', '_load_buddypress' );
Note: See TracChangeset for help on using the changeset viewer.