Delete installing transient.

This commit is contained in:
Mike Jolley 2017-10-05 18:11:25 +01:00
parent 7cb7e3c864
commit 7d7907fc8e
1 changed files with 3 additions and 2 deletions

View File

@ -27,17 +27,18 @@ class WC_Tests_Install extends WC_Unit_Test_Case {
* Test - install.
*/
public function test_install() {
// clean existing install first
// clean existing install first.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
define( 'WP_UNINSTALL_PLUGIN', true );
define( 'WC_REMOVE_ALL_DATA', true );
}
include( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/uninstall.php' );
delete_transient( 'wc_installing' );
WC_Install::install();
$this->assertTrue( get_option( 'woocommerce_version' ) === WC()->version );
$this->assertEquals( WC()->version, get_option( 'woocommerce_version' ), print_r( array( 'Stored version' => get_option( 'woocommerce_version' ), 'WC Version' => WC()->version ), true ) );
}
/**