mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
✅ Update unit tests
This commit is contained in:
parent
05fec033c3
commit
48f59abba1
1 changed files with 5 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue