From 54d50d830799d3154927952d3175a525a295fbed Mon Sep 17 00:00:00 2001 From: Bryan Purcell Date: Thu, 11 Dec 2014 00:00:49 -0600 Subject: [PATCH] Clearing out the cart, and the mock product --- tests/unit-tests/customer.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/unit-tests/customer.php b/tests/unit-tests/customer.php index 4b1976e73de..d28e46689ee 100644 --- a/tests/unit-tests/customer.php +++ b/tests/unit-tests/customer.php @@ -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 ); } } \ No newline at end of file