Merge pull request #922 from woocommerce/PCP-937-php-8.1-support

PHP 8.1 support
This commit is contained in:
Emili Castells 2022-11-02 16:39:06 +01:00 committed by GitHub
commit 8bc53bf3cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 76 additions and 55 deletions

View file

@ -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);
$wcOrder->shouldReceive('update_meta_data')
@ -88,6 +88,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);