From 6ac167ac36ff303ac373f14a0939758fbee264a8 Mon Sep 17 00:00:00 2001 From: Nicola Mustone Date: Mon, 2 Mar 2015 17:06:03 +0100 Subject: [PATCH] wc-cart-functions - unit tests begin --- tests/unit-tests/cart-functions.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/unit-tests/cart-functions.php diff --git a/tests/unit-tests/cart-functions.php b/tests/unit-tests/cart-functions.php new file mode 100644 index 00000000000..426ec0dc2f5 --- /dev/null +++ b/tests/unit-tests/cart-functions.php @@ -0,0 +1,27 @@ +cart->add_to_cart( $product->id, 1 ); + + // Empty the cart + wc_empty_cart(); + + // Check if the cart is empty + $this->assertEquals( 0, WC()->cart->get_cart_contents_count() ); + } +}