Delete installing transient.
This commit is contained in:
parent
7cb7e3c864
commit
7d7907fc8e
|
@ -27,17 +27,18 @@ class WC_Tests_Install extends WC_Unit_Test_Case {
|
||||||
* Test - install.
|
* Test - install.
|
||||||
*/
|
*/
|
||||||
public function test_install() {
|
public function test_install() {
|
||||||
// clean existing install first
|
// clean existing install first.
|
||||||
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
||||||
define( 'WP_UNINSTALL_PLUGIN', true );
|
define( 'WP_UNINSTALL_PLUGIN', true );
|
||||||
define( 'WC_REMOVE_ALL_DATA', true );
|
define( 'WC_REMOVE_ALL_DATA', true );
|
||||||
}
|
}
|
||||||
|
|
||||||
include( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/uninstall.php' );
|
include( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/uninstall.php' );
|
||||||
|
delete_transient( 'wc_installing' );
|
||||||
|
|
||||||
WC_Install::install();
|
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 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue