Fix phpunit tests

This commit is contained in:
dinamiko 2021-06-04 11:57:25 +02:00
parent 064fab6e64
commit 35c959718e
4 changed files with 44 additions and 18 deletions

View file

@ -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);