From 85ad00293730c08593608c9325e45aa41785c703 Mon Sep 17 00:00:00 2001 From: dinamiko Date: Fri, 2 Sep 2022 14:09:51 +0200 Subject: [PATCH] Fix phpunit --- tests/PHPUnit/WcGateway/Assets/SettingsPagesAssetsTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/PHPUnit/WcGateway/Assets/SettingsPagesAssetsTest.php b/tests/PHPUnit/WcGateway/Assets/SettingsPagesAssetsTest.php index 1827e02cc..23f32d100 100644 --- a/tests/PHPUnit/WcGateway/Assets/SettingsPagesAssetsTest.php +++ b/tests/PHPUnit/WcGateway/Assets/SettingsPagesAssetsTest.php @@ -3,6 +3,7 @@ namespace WooCommerce\PayPalCommerce\WcGateway\Assets; use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer; +use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\TestCase; use function Brain\Monkey\Functions\when; use Mockery; @@ -13,8 +14,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'; + $subscriptionsHelper = Mockery::mock(SubscriptionHelper::class); - $testee = new SettingsPageAssets($moduleUrl, $modulePath); + $testee = new SettingsPageAssets($moduleUrl, $modulePath, $subscriptionsHelper); when('is_admin') ->justReturn(true);