mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix phpunit
This commit is contained in:
parent
5f299b2939
commit
f66c2322fd
4 changed files with 8 additions and 2 deletions
|
@ -70,7 +70,7 @@ class VaultedCreditCardHandlerTest extends TestCase
|
|||
|
||||
public function testHandlePaymentChangingPayment()
|
||||
{
|
||||
when('filter_input')->justReturn(1);
|
||||
$_POST['woocommerce_change_payment'] = 1;
|
||||
$wcOrder = Mockery::mock(\WC_Order::class);
|
||||
$wcOrder->shouldReceive('get_id')->andReturn(1);
|
||||
$this->subscriptionHelper->shouldReceive('has_subscription')->andReturn(true);
|
||||
|
@ -85,6 +85,8 @@ class VaultedCreditCardHandlerTest extends TestCase
|
|||
|
||||
public function testHandlePayment()
|
||||
{
|
||||
$_POST['woocommerce_change_payment'] = null;
|
||||
|
||||
$wcOrder = Mockery::mock(\WC_Order::class);
|
||||
$wcOrder->shouldReceive('get_id')->andReturn(1);
|
||||
$wcOrder->shouldReceive('get_customer_id')->andReturn(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue