From f00a94c6ba9eccd6a0f326e9d514f68503656239 Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Fri, 11 Oct 2024 09:03:55 +0200 Subject: [PATCH] Update tests --- .../ApplePayButton/DataToAppleButtonScriptsTest.php | 2 ++ tests/php/Functional/ApplePayButton/ResponsesToAppleTest.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/php/Functional/ApplePayButton/DataToAppleButtonScriptsTest.php b/tests/php/Functional/ApplePayButton/DataToAppleButtonScriptsTest.php index 1d4c79ce..40fe4bbd 100644 --- a/tests/php/Functional/ApplePayButton/DataToAppleButtonScriptsTest.php +++ b/tests/php/Functional/ApplePayButton/DataToAppleButtonScriptsTest.php @@ -52,6 +52,7 @@ public function testApplePayScriptDataOnProduct() 'wc_get_product' => $this->wcProduct(), 'admin_url' => 'admin-ajax.php', 'get_option' => false, + 'is_admin' => false, ] ); @@ -97,6 +98,7 @@ public function testApplePayScriptDataOnCart() 'admin_url' => 'admin-ajax.php', 'WC' => $this->wooCommerce($subtotal), 'wp_nonce_field'=> 'testNonce', + 'is_admin' => false, ] ); diff --git a/tests/php/Functional/ApplePayButton/ResponsesToAppleTest.php b/tests/php/Functional/ApplePayButton/ResponsesToAppleTest.php index 01636dab..59908b6b 100644 --- a/tests/php/Functional/ApplePayButton/ResponsesToAppleTest.php +++ b/tests/php/Functional/ApplePayButton/ResponsesToAppleTest.php @@ -71,7 +71,8 @@ public function testAppleFormattedResponseWithoutShippingMethod() ] ]; - + //shippingMethods is null this is not going to run + $applePayRequestDataObject = []; expect('get_bloginfo') ->once() ->with('name') @@ -107,6 +108,8 @@ public function testAppleFormattedResponseWithShippingMethod() 'taxes' => $taxes, 'total' => $total ]; + //shippingMethods is null this is not going to run + $applePayRequestDataObject = []; $expectedResponse = [ 'newLineItems'=>[ [