From 48f59abba1e4645ce6ca25f8a79ce0f2856ecc05 Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Wed, 18 Sep 2024 15:45:05 +0200
Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Update=20unit=20tests?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
tests/PHPUnit/WcGateway/Gateway/CreditCardGatewayTest.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/PHPUnit/WcGateway/Gateway/CreditCardGatewayTest.php b/tests/PHPUnit/WcGateway/Gateway/CreditCardGatewayTest.php
index 8a3528b11..01d8cc9c1 100644
--- a/tests/PHPUnit/WcGateway/Gateway/CreditCardGatewayTest.php
+++ b/tests/PHPUnit/WcGateway/Gateway/CreditCardGatewayTest.php
@@ -20,6 +20,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Endpoint\CaptureCardPayment;
use WooCommerce\PayPalCommerce\WcGateway\Processor\OrderProcessor;
use WooCommerce\PayPalCommerce\WcGateway\Processor\RefundProcessor;
use WooCommerce\PayPalCommerce\WcGateway\Settings\SettingsRenderer;
+use WooCommerce\PayPalCommerce\WcGateway\Helper\DCCGatewayConfiguration;
use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper;
use function Brain\Monkey\Functions\when;
@@ -28,6 +29,7 @@ class CreditCardGatewayTest extends TestCase
private $settingsRenderer;
private $orderProcessor;
private $config;
+ private $dcc_configuration;
private $creditCardIcons;
private $moduleUrl;
private $sessionHandler;
@@ -53,6 +55,7 @@ class CreditCardGatewayTest extends TestCase
$this->settingsRenderer = Mockery::mock(SettingsRenderer::class);
$this->orderProcessor = Mockery::mock(OrderProcessor::class);
$this->config = Mockery::mock(ContainerInterface::class);
+ $this->dcc_configuration = Mockery::mock(DCCGatewayConfiguration::class);
$this->creditCardIcons = [];
$this->moduleUrl = '';
$this->sessionHandler = Mockery::mock(SessionHandler::class);
@@ -73,6 +76,7 @@ class CreditCardGatewayTest extends TestCase
$this->state->shouldReceive('current_state')->andReturn(State::STATE_ONBOARDED);
$this->config->shouldReceive('has')->andReturn(true);
$this->config->shouldReceive('get')->andReturn('');
+ $this->dcc_configuration->shouldReceive('gateway_title')->andReturn('');
when('wc_clean')->returnArg();
@@ -80,6 +84,7 @@ class CreditCardGatewayTest extends TestCase
$this->settingsRenderer,
$this->orderProcessor,
$this->config,
+ $this->dcc_configuration,
$this->creditCardIcons,
$this->moduleUrl,
$this->sessionHandler,