From 2439ac2c25fa07c1670acf99900226ab044e6656 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 24 Oct 2014 15:20:54 +0200 Subject: [PATCH] Unit Tests: Added test_get_cart_url method --- tests/unit-tests/cart.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit-tests/cart.php b/tests/unit-tests/cart.php index cd825d5c31a..462dca400a7 100644 --- a/tests/unit-tests/cart.php +++ b/tests/unit-tests/cart.php @@ -72,7 +72,14 @@ class WC_Tests_Cart extends WC_Unit_Test_Case { } + /** + * Test test_get_cart_url method + * + * @since 2.3 + */ public function test_get_cart_url() { + $cart_page_id = wc_get_page_id( 'cart' ); + $this->assertEquals( apply_filters( 'woocommerce_get_cart_url', $cart_page_id ? get_permalink( $cart_page_id ) : '' ), WC()->cart->get_cart_url() ); } /**