Cache the DCC status PayPal response.

This commit is contained in:
Narek Zakarian 2022-09-13 18:26:02 +04:00
parent cbba252be7
commit bd3d886250
4 changed files with 48 additions and 5 deletions

View file

@ -37,6 +37,7 @@ class SettingsListenerTest extends ModularTestCase
$signup_link_cache = Mockery::mock(Cache::class);
$signup_link_ids = array();
$pui_status_cache = Mockery::mock(Cache::class);
$dcc_status_cache = Mockery::mock(Cache::class);
$testee = new SettingsListener(
$settings,
@ -48,7 +49,8 @@ class SettingsListenerTest extends ModularTestCase
PayPalGateway::ID,
$signup_link_cache,
$signup_link_ids,
$pui_status_cache
$pui_status_cache,
$dcc_status_cache
);
$_GET['section'] = PayPalGateway::ID;
@ -79,6 +81,8 @@ class SettingsListenerTest extends ModularTestCase
$signup_link_cache->shouldReceive('has')
->andReturn(false);
$pui_status_cache->shouldReceive('has')
->andReturn(false);
$dcc_status_cache->shouldReceive('has')
->andReturn(false);
$testee->listen();