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() ); + } +}