mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Cache partner referrals signup links
This commit is contained in:
parent
12a8596261
commit
f813cf451a
5 changed files with 56 additions and 11 deletions
|
@ -32,12 +32,11 @@ class SettingsListenerTest extends ModularTestCase
|
|||
$webhook_registrar = Mockery::mock(WebhookRegistrar::class);
|
||||
$webhook_registrar->shouldReceive('unregister')->andReturnTrue();
|
||||
$webhook_registrar->shouldReceive('register')->andReturnTrue();
|
||||
|
||||
$cache = Mockery::mock(Cache::class);
|
||||
|
||||
$state = Mockery::mock(State::class);
|
||||
$state->shouldReceive('current_state')->andReturn(State::STATE_ONBOARDED);
|
||||
$bearer = Mockery::mock(Bearer::class);
|
||||
$signup_link_cache = Mockery::mock(Cache::class);
|
||||
|
||||
$testee = new SettingsListener(
|
||||
$settings,
|
||||
|
@ -46,7 +45,8 @@ class SettingsListenerTest extends ModularTestCase
|
|||
$cache,
|
||||
$state,
|
||||
$bearer,
|
||||
PayPalGateway::ID
|
||||
PayPalGateway::ID,
|
||||
$signup_link_cache
|
||||
);
|
||||
|
||||
$_GET['section'] = PayPalGateway::ID;
|
||||
|
@ -74,6 +74,8 @@ class SettingsListenerTest extends ModularTestCase
|
|||
$settings->shouldReceive('persist');
|
||||
$cache->shouldReceive('has')
|
||||
->andReturn(false);
|
||||
$signup_link_cache->shouldReceive('has')
|
||||
->andReturn(false);
|
||||
|
||||
$testee->listen();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue