From 23db5a8c74f582ca41930252465ac5d00f630658 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Tue, 21 Oct 2014 15:09:03 +0200 Subject: [PATCH] Start of cart unit tests. --- tests/unit-tests/cart.php | 79 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 tests/unit-tests/cart.php diff --git a/tests/unit-tests/cart.php b/tests/unit-tests/cart.php new file mode 100644 index 00000000000..6b5cbf63785 --- /dev/null +++ b/tests/unit-tests/cart.php @@ -0,0 +1,79 @@ +assertEquals( $this->get_checkout_url(), WC()->cart->get_checkout_url() ); + + // Restore option + update_option( 'woocommerce_force_ssl_checkout', $o_setting ); + + } + + /** + * Test get_checkout_url over HTTP + * + * @since 2.3 + */ + public function test_get_checkout_url_ssl() { + + // Get the original setting + $o_setting = get_option( 'woocommerce_force_ssl_checkout' ); + + // Force SLL checkout + update_option( 'woocommerce_force_ssl_checkout', 'yes' ); + + $this->assertEquals( $this->get_checkout_url(), WC()->cart->get_checkout_url() ); + + // Restore option + update_option( 'woocommerce_force_ssl_checkout', $o_setting ); + + } + + public function test_get_cart_url() { + } + + +} \ No newline at end of file