Always clean install in PHPUnit Tests.

Props bpetty.
Fixes #25871.



git-svn-id: https://develop.svn.wordpress.org/trunk@26095 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2013-11-11 22:14:24 +00:00
parent 2ccc101050
commit 6603f4802a
1 changed files with 0 additions and 13 deletions

View File

@ -22,17 +22,6 @@ require_once ABSPATH . '/wp-settings.php';
require_once ABSPATH . '/wp-admin/includes/upgrade.php';
require_once ABSPATH . '/wp-includes/wp-db.php';
define( 'WP_TESTS_VERSION_FILE', ABSPATH . '.wp-tests-version' );
$wpdb->suppress_errors();
$installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" );
$wpdb->suppress_errors( false );
$hash = get_option( 'db_version' ) . ' ' . (int) $multisite . ' ' . sha1_file( $config_file_path );
if ( $installed && file_exists( WP_TESTS_VERSION_FILE ) && file_get_contents( WP_TESTS_VERSION_FILE ) == $hash )
return;
$wpdb->query( 'SET storage_engine = INNODB' );
$wpdb->select( DB_NAME, $wpdb->dbh );
@ -63,5 +52,3 @@ if ( $multisite ) {
install_network();
populate_network( 1, WP_TESTS_DOMAIN, WP_TESTS_EMAIL, $title, '/', $subdomain_install );
}
file_put_contents( WP_TESTS_VERSION_FILE, $hash );