Add birth date validation for pay for order

This commit is contained in:
dinamiko 2022-05-16 16:51:29 +02:00
parent de12327f6c
commit be22a60b93
5 changed files with 127 additions and 96 deletions

View file

@ -13,6 +13,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Factory\PurchaseUnitFactory;
use WooCommerce\PayPalCommerce\Onboarding\Environment;
use WooCommerce\PayPalCommerce\TestCase;
use WooCommerce\PayPalCommerce\WcGateway\Gateway\TransactionUrlProvider;
use WooCommerce\PayPalCommerce\WcGateway\Helper\PayUponInvoiceHelper;
use function Brain\Monkey\Functions\when;
class PayUponInvoiceGatewayTest extends TestCase
@ -24,6 +25,7 @@ class PayUponInvoiceGatewayTest extends TestCase
private $transaction_url_provider;
private $logger;
private $testee;
private $pui_helper;
public function setUp(): void
{
@ -35,6 +37,7 @@ class PayUponInvoiceGatewayTest extends TestCase
$this->environment = Mockery::mock(Environment::class);
$this->logger = Mockery::mock(LoggerInterface::class);
$this->transaction_url_provider = Mockery::mock(TransactionUrlProvider::class);
$this->pui_helper = Mockery::mock(PayUponInvoiceHelper::class);
$this->setInitStubs();
@ -44,7 +47,8 @@ class PayUponInvoiceGatewayTest extends TestCase
$this->payment_source_factory,
$this->environment,
$this->transaction_url_provider,
$this->logger
$this->logger,
$this->pui_helper
);
}