Fix phpunit

This commit is contained in:
dinamiko 2022-11-07 15:56:37 +01:00
parent cb749e78d0
commit df38a3bb85

View file

@ -13,6 +13,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
use WooCommerce\PayPalCommerce\ApiClient\Factory\PurchaseUnitFactory; use WooCommerce\PayPalCommerce\ApiClient\Factory\PurchaseUnitFactory;
use WooCommerce\PayPalCommerce\ApiClient\Factory\ShippingPreferenceFactory; use WooCommerce\PayPalCommerce\ApiClient\Factory\ShippingPreferenceFactory;
use WooCommerce\PayPalCommerce\TestCase; use WooCommerce\PayPalCommerce\TestCase;
use WooCommerce\PayPalCommerce\WcGateway\Gateway\TransactionUrlProvider;
use function Brain\Monkey\Functions\when; use function Brain\Monkey\Functions\when;
class OXXOGatewayTest extends TestCase class OXXOGatewayTest extends TestCase
@ -22,6 +23,7 @@ private $purchaseUnitFactory;
private $shippingPreferenceFactory; private $shippingPreferenceFactory;
private $logger; private $logger;
private $wcOrder; private $wcOrder;
private $transactionUrlProvider;
private $testee; private $testee;
public function setUp(): void public function setUp(): void
@ -31,6 +33,7 @@ private $testee;
$this->orderEndpoint = Mockery::mock(OrderEndpoint::class); $this->orderEndpoint = Mockery::mock(OrderEndpoint::class);
$this->purchaseUnitFactory = Mockery::mock(PurchaseUnitFactory::class); $this->purchaseUnitFactory = Mockery::mock(PurchaseUnitFactory::class);
$this->shippingPreferenceFactory = Mockery::mock(ShippingPreferenceFactory::class); $this->shippingPreferenceFactory = Mockery::mock(ShippingPreferenceFactory::class);
$this->transactionUrlProvider = Mockery::mock(TransactionUrlProvider::class);
$this->logger = Mockery::mock(LoggerInterface::class); $this->logger = Mockery::mock(LoggerInterface::class);
$this->wcOrder = Mockery::mock(WC_Order::class); $this->wcOrder = Mockery::mock(WC_Order::class);
@ -45,6 +48,7 @@ private $testee;
$this->purchaseUnitFactory, $this->purchaseUnitFactory,
$this->shippingPreferenceFactory, $this->shippingPreferenceFactory,
'oxxo.svg', 'oxxo.svg',
$this->transactionUrlProvider,
$this->logger $this->logger
); );
} }