1, 'blogs' => 1, 'friends' => 1, 'groups' => 1, 'members' => 1, 'messages' => 1, 'notifications' => 1, 'settings' => 1, 'xprofile' => 1, ); } tests_add_filter( 'bp_new_install_default_components', 'wp_test_bp_install' ); tests_add_filter( 'bp_get_signup_allowed', '__return_true' ); $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; $_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN; $PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php'; require_once ABSPATH . '/wp-settings.php'; echo "Installing BuddyPress...\n"; $wpdb->query( 'SET default_storage_engine = INNODB' ); $wpdb->select( DB_NAME, $wpdb->dbh ); // Drop BuddyPress tables. foreach ( $wpdb->get_col( "SHOW TABLES LIKE '" . $wpdb->prefix . "bp%'" ) as $bp_table ) { $wpdb->query( "DROP TABLE {$bp_table}" ); } function _bp_mock_mailer( $class ) { return 'BP_UnitTest_Mailer'; } tests_add_filter( 'bp_send_email_delivery_class', '_bp_mock_mailer' ); // Install BuddyPress bp_version_updater();