Skip to:
Content

BuddyPress.org

Changeset 7693


Ignore:
Timestamp:
12/17/2013 06:47:59 PM (12 years ago)
Author:
boonebgorges
Message:

Reinstall BP fresh on each run of unit tests

Fixes #5302

File:
1 edited

Legend:

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

    r7521 r7693  
    3636
    3737require_once ABSPATH . '/wp-settings.php';
    38 define( 'BP_TESTS_DB_VERSION_FILE', ABSPATH . '.bp-tests-version' );
    39 
    40 // Check if BuddyPress has already been installed
    41 $db_version = buddypress()->db_version;
    42 $hash = $db_version . ' ' . (int) $multisite . ' ' . sha1_file( $config_file_path );
    43 
    44 if ( $db_version && file_exists( BP_TESTS_DB_VERSION_FILE ) ) {
    45     $version_file = file_get_contents( BP_TESTS_DB_VERSION_FILE );
    46 
    47     if ( $hash === $version_file ) {
    48         return;
    49     }
    50 }
    5138
    5239echo "Installing BuddyPress...\n";
     
    7158// Install BuddyPress
    7259bp_version_updater();
    73 
    74 file_put_contents( BP_TESTS_DB_VERSION_FILE, $hash );
Note: See TracChangeset for help on using the changeset viewer.