From 40c648b83c71616f33c0bd9f33299dd2b77862c6 Mon Sep 17 00:00:00 2001 From: Emili Castells Guasch Date: Mon, 9 Dec 2024 16:14:29 +0100 Subject: [PATCH] Fix phpunit --- tests/PHPUnit/WcSubscriptions/Helper/SubscriptionHelperTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/PHPUnit/WcSubscriptions/Helper/SubscriptionHelperTest.php b/tests/PHPUnit/WcSubscriptions/Helper/SubscriptionHelperTest.php index bbde3ebe0..9423fdc32 100644 --- a/tests/PHPUnit/WcSubscriptions/Helper/SubscriptionHelperTest.php +++ b/tests/PHPUnit/WcSubscriptions/Helper/SubscriptionHelperTest.php @@ -7,6 +7,7 @@ use Mockery; use WC_Order; use WC_Subscription; use WooCommerce\PayPalCommerce\TestCase; +use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway; use function Brain\Monkey\Functions\when; class SubscriptionHelperTest extends TestCase @@ -26,6 +27,7 @@ class SubscriptionHelperTest extends TestCase $wc_order = Mockery::mock(WC_Order::class); $wc_order->shouldReceive('get_status')->andReturn('processing'); $wc_order->shouldReceive('get_transaction_id')->andReturn('ABC123'); + $wc_order->shouldReceive('get_payment_method')->andReturn(CreditCardGateway::ID); when('wc_get_order')->justReturn($wc_order);