mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Fix phpunit
This commit is contained in:
parent
f48418c6e9
commit
40c648b83c
1 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ use Mockery;
|
|||
use WC_Order;
|
||||
use WC_Subscription;
|
||||
use WooCommerce\PayPalCommerce\TestCase;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
||||
use function Brain\Monkey\Functions\when;
|
||||
|
||||
class SubscriptionHelperTest extends TestCase
|
||||
|
@ -26,6 +27,7 @@ class SubscriptionHelperTest extends TestCase
|
|||
$wc_order = Mockery::mock(WC_Order::class);
|
||||
$wc_order->shouldReceive('get_status')->andReturn('processing');
|
||||
$wc_order->shouldReceive('get_transaction_id')->andReturn('ABC123');
|
||||
$wc_order->shouldReceive('get_payment_method')->andReturn(CreditCardGateway::ID);
|
||||
|
||||
when('wc_get_order')->justReturn($wc_order);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue