mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix PHPunit tests
This commit is contained in:
parent
2938b15bc2
commit
cbba252be7
1 changed files with 5 additions and 1 deletions
|
@ -36,6 +36,7 @@ class SettingsListenerTest extends ModularTestCase
|
||||||
$bearer = Mockery::mock(Bearer::class);
|
$bearer = Mockery::mock(Bearer::class);
|
||||||
$signup_link_cache = Mockery::mock(Cache::class);
|
$signup_link_cache = Mockery::mock(Cache::class);
|
||||||
$signup_link_ids = array();
|
$signup_link_ids = array();
|
||||||
|
$pui_status_cache = Mockery::mock(Cache::class);
|
||||||
|
|
||||||
$testee = new SettingsListener(
|
$testee = new SettingsListener(
|
||||||
$settings,
|
$settings,
|
||||||
|
@ -46,7 +47,8 @@ class SettingsListenerTest extends ModularTestCase
|
||||||
$bearer,
|
$bearer,
|
||||||
PayPalGateway::ID,
|
PayPalGateway::ID,
|
||||||
$signup_link_cache,
|
$signup_link_cache,
|
||||||
$signup_link_ids
|
$signup_link_ids,
|
||||||
|
$pui_status_cache
|
||||||
);
|
);
|
||||||
|
|
||||||
$_GET['section'] = PayPalGateway::ID;
|
$_GET['section'] = PayPalGateway::ID;
|
||||||
|
@ -76,6 +78,8 @@ class SettingsListenerTest extends ModularTestCase
|
||||||
->andReturn(false);
|
->andReturn(false);
|
||||||
$signup_link_cache->shouldReceive('has')
|
$signup_link_cache->shouldReceive('has')
|
||||||
->andReturn(false);
|
->andReturn(false);
|
||||||
|
$pui_status_cache->shouldReceive('has')
|
||||||
|
->andReturn(false);
|
||||||
|
|
||||||
$testee->listen();
|
$testee->listen();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue