Cache partner referrals signup links

This commit is contained in:
dinamiko 2022-05-25 09:42:37 +02:00
parent 12a8596261
commit f813cf451a
5 changed files with 56 additions and 11 deletions

View file

@ -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();
}