Clearing out the cart, and the mock product

This commit is contained in:
Bryan Purcell 2014-12-11 00:00:49 -06:00
parent bc9821253f
commit 54d50d8307
1 changed files with 12 additions and 0 deletions

View File

@ -50,6 +50,12 @@ class WC_Tests_Customer extends WC_Unit_Test_Case {
WC_Helper_Customer::set_chosen_shipping_methods( $original_chosen_shipping_methods );
WC_Helper_Customer::set_tax_based_on( $original_tax_based_on );
WC_Helper_Customer::set_customer_details( $original_customer_details );
// Clean up the cart
WC()->cart->empty_cart();
// Clean up product
WC_Helper_Product::delete_product( $product->id );
}
/**
@ -98,5 +104,11 @@ class WC_Tests_Customer extends WC_Unit_Test_Case {
WC_Helper_Customer::set_chosen_shipping_methods( $original_chosen_shipping_methods );
WC_Helper_Customer::set_tax_based_on( $original_tax_based_on );
WC_Helper_Customer::set_customer_details( $original_customer_details );
// Clean up the cart
WC()->cart->empty_cart();
// Clean up product
WC_Helper_Product::delete_product( $product->id );
}
}