mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Fix unit tests
This commit is contained in:
parent
cf0d7858fd
commit
56f12ed853
2 changed files with 5 additions and 2 deletions
|
@ -6,6 +6,7 @@ namespace WooCommerce\PayPalCommerce\WcGateway\Gateway\PayUponInvoice;
|
|||
use Mockery;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use WC_Order;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PayUponInvoiceOrderEndpoint;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Entity\Order;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Factory\PurchaseUnitFactory;
|
||||
|
|
|
@ -47,6 +47,7 @@ class WcGatewayTest extends TestCase
|
|||
private $logger;
|
||||
private $paymentsEndpoint;
|
||||
private $orderEndpoint;
|
||||
private $apiShopCountry;
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
@ -70,6 +71,7 @@ class WcGatewayTest extends TestCase
|
|||
$this->paymentsEndpoint = Mockery::mock(PaymentsEndpoint::class);
|
||||
$this->orderEndpoint = Mockery::mock(OrderEndpoint::class);
|
||||
$this->funding_source_renderer = new FundingSourceRenderer($this->settings);
|
||||
$this->apiShopCountry = 'DE';
|
||||
|
||||
$this->onboardingState->shouldReceive('current_state')->andReturn(State::STATE_ONBOARDED);
|
||||
|
||||
|
@ -102,7 +104,8 @@ class WcGatewayTest extends TestCase
|
|||
$this->paymentTokenRepository,
|
||||
$this->logger,
|
||||
$this->paymentsEndpoint,
|
||||
$this->orderEndpoint
|
||||
$this->orderEndpoint,
|
||||
$this->apiShopCountry
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -135,7 +138,6 @@ class WcGatewayTest extends TestCase
|
|||
->with($orderId)
|
||||
->andReturn($wcOrder);
|
||||
|
||||
|
||||
when('wc_get_checkout_url')
|
||||
->justReturn('test');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue