method to check if PUI is ready in admin screen

This commit is contained in:
Narek Zakarian 2022-08-12 16:50:05 +04:00
parent 396352775b
commit 10da1f8067
2 changed files with 42 additions and 1 deletions

View file

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\WcGateway\Helper;
use DateTime;
use Mockery;
use WooCommerce\PayPalCommerce\TestCase;
class PayUponInvoiceHelperTest extends TestCase
@ -13,7 +14,8 @@ class PayUponInvoiceHelperTest extends TestCase
*/
public function testValidateBirthDate($input, $output)
{
$this->assertSame((new PayUponInvoiceHelper())->validate_birth_date($input), $output);
$pui_product_status = Mockery::mock(PayUponInvoiceProductStatus::class);
$this->assertSame((new PayUponInvoiceHelper('DE', $pui_product_status))->validate_birth_date($input), $output);
}
public function datesProvider(): array{