From c4ef7094939fc9ed7546f13448f0dd92116f83bf Mon Sep 17 00:00:00 2001 From: carmenmaymo Date: Mon, 20 Jan 2025 10:16:00 +0100 Subject: [PATCH] Fix tests The label was moved to a hook so we need to init it in test --- tests/php/Functional/Shared/SurchargeHandlerTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/php/Functional/Shared/SurchargeHandlerTest.php b/tests/php/Functional/Shared/SurchargeHandlerTest.php index bbf43be0..764616cd 100644 --- a/tests/php/Functional/Shared/SurchargeHandlerTest.php +++ b/tests/php/Functional/Shared/SurchargeHandlerTest.php @@ -59,6 +59,7 @@ public function addsSurchargeFeesInCheckout(){ [new Surcharge()], ['canProcessOrder', 'canProcessGateway', 'orderRemoveFee', 'orderAddFee'] )->getMock(); + $testee->initializeGatewayFeeLabel(); expect('mollieWooCommerceIsCheckoutContext')->andReturn(true); expect('wc_tax_enabled')->andReturn(false); expect('WC')->andReturn($this->wooCommerce()); @@ -106,6 +107,7 @@ public function addsSurchargeFeesInOrderPayPage() [new Surcharge()], ['canProcessOrder', 'canProcessGateway', 'orderRemoveFee', 'orderAddFee'] )->getMock(); + $testee->initializeGatewayFeeLabel(); $testee->expects($this->once()) ->method('canProcessOrder')