From 6603f4802a85ddbbbf5611b21ae9e44ffab89820 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 11 Nov 2013 22:14:24 +0000 Subject: [PATCH] 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 --- tests/phpunit/includes/install.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests/phpunit/includes/install.php b/tests/phpunit/includes/install.php index 63de9d2185..b9480bce60 100644 --- a/tests/phpunit/includes/install.php +++ b/tests/phpunit/includes/install.php @@ -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 );