mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Fix phpunit
This commit is contained in:
parent
ae11b15164
commit
85ad002937
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
namespace WooCommerce\PayPalCommerce\WcGateway\Assets;
|
namespace WooCommerce\PayPalCommerce\WcGateway\Assets;
|
||||||
|
|
||||||
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
||||||
|
use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper;
|
||||||
use WooCommerce\PayPalCommerce\TestCase;
|
use WooCommerce\PayPalCommerce\TestCase;
|
||||||
use function Brain\Monkey\Functions\when;
|
use function Brain\Monkey\Functions\when;
|
||||||
use Mockery;
|
use Mockery;
|
||||||
|
@ -13,8 +14,9 @@ class SettingsPagesAssetsTest extends TestCase
|
||||||
{
|
{
|
||||||
$moduleUrl = 'http://example.com/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway';
|
$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';
|
$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')
|
when('is_admin')
|
||||||
->justReturn(true);
|
->justReturn(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue