mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Fix phpunit tests
This commit is contained in:
parent
064fab6e64
commit
35c959718e
4 changed files with 44 additions and 18 deletions
|
@ -2,8 +2,10 @@
|
|||
|
||||
namespace WooCommerce\PayPalCommerce\WcGateway\Assets;
|
||||
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
||||
use WooCommerce\PayPalCommerce\TestCase;
|
||||
use function Brain\Monkey\Functions\when;
|
||||
use Mockery;
|
||||
|
||||
class SettingsPagesAssetsTest extends TestCase
|
||||
{
|
||||
|
@ -11,8 +13,9 @@ class SettingsPagesAssetsTest extends TestCase
|
|||
{
|
||||
$moduleUrl = 'http://example.com/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway';
|
||||
$modulePath = '/var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway';
|
||||
$bearer = Mockery::mock(Bearer::class);
|
||||
|
||||
$testee = new SettingsPageAssets($moduleUrl, $modulePath);
|
||||
$testee = new SettingsPageAssets($moduleUrl, $modulePath, $bearer);
|
||||
|
||||
when('is_admin')
|
||||
->justReturn(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue