From 3f70f70f3a2df1d3417c3653464e2da8d234c7e3 Mon Sep 17 00:00:00 2001 From: Jonathan Sadowski Date: Fri, 24 Apr 2020 13:54:12 -0500 Subject: [PATCH] Switch to assertCount for count assertions in test --- tests/legacy/unit-tests/cart/cart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/legacy/unit-tests/cart/cart.php b/tests/legacy/unit-tests/cart/cart.php index d374430c6c4..5e0fa7d414a 100644 --- a/tests/legacy/unit-tests/cart/cart.php +++ b/tests/legacy/unit-tests/cart/cart.php @@ -2074,7 +2074,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case { remove_filter( 'woocommerce_add_to_cart_redirect', '__return_false' ); // Check if the item is in the cart. - $this->assertEquals( 1, count( WC()->cart->get_cart_contents() ) ); + $this->assertCount( 1, WC()->cart->get_cart_contents() ); $this->assertEquals( 1, WC()->cart->get_cart_contents_count() ); // Add variation using parent id. @@ -2090,7 +2090,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case { ); // Check that the second add to cart call increases the quantity of the existing cart-item. - $this->assertEquals( 1, count( WC()->cart->get_cart_contents() ) ); + $this->assertCount( 1, WC()->cart->get_cart_contents() ); $this->assertEquals( 2, WC()->cart->get_cart_contents_count() ); }