mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Fix vaulting integration credit card test
This commit is contained in:
parent
846a77d144
commit
2280cf9081
2 changed files with 6 additions and 2 deletions
|
@ -220,9 +220,13 @@ class IntegrationMockedTestCase extends TestCase
|
||||||
$order_status->shouldReceive('is')->andReturn($order_success);
|
$order_status->shouldReceive('is')->andReturn($order_success);
|
||||||
$order_status->shouldReceive('name')->andReturn($order_success ? 'COMPLETED' : 'FAILED');
|
$order_status->shouldReceive('name')->andReturn($order_success ? 'COMPLETED' : 'FAILED');
|
||||||
$order->shouldReceive('status')->andReturn($order_status);
|
$order->shouldReceive('status')->andReturn($order_status);
|
||||||
|
$card_properties = new \stdClass();
|
||||||
|
$card_properties->brand = 'VISA';
|
||||||
|
$card_properties->last_digits = '1234';
|
||||||
|
$card_properties->expiry = '2026-12';
|
||||||
$payment_source = \Mockery::mock(PaymentSource::class);
|
$payment_source = \Mockery::mock(PaymentSource::class);
|
||||||
$payment_source->shouldReceive('name')->andReturn('card');
|
$payment_source->shouldReceive('name')->andReturn('card');
|
||||||
|
$payment_source->shouldReceive('properties')->andReturn($card_properties);
|
||||||
$order->shouldReceive('payment_source')->andReturn($payment_source);
|
$order->shouldReceive('payment_source')->andReturn($payment_source);
|
||||||
|
|
||||||
$purchase_unit = \Mockery::mock(PurchaseUnit::class)->shouldIgnoreMissing();
|
$purchase_unit = \Mockery::mock(PurchaseUnit::class)->shouldIgnoreMissing();
|
||||||
|
|
|
@ -167,7 +167,7 @@ class VaultingSubscriptionsTest extends IntegrationMockedTestCase
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'PayPal Gateway' => [PayPalGateway::ID],
|
'PayPal Gateway' => [PayPalGateway::ID],
|
||||||
//'Credit Card Gateway' => [CreditCardGateway::ID]
|
'Credit Card Gateway' => [CreditCardGateway::ID]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue