mirror of
https://gitee.com/ShopeX/ECShopX
synced 2026-08-02 18:46:13 +08:00
47 lines
1.4 KiB
PHP
47 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\OrdersBundle;
|
|
|
|
use OrdersBundle\Services\OrderPostPayIntegrationReadinessService;
|
|
|
|
class OrderPostPayIntegrationReadinessServiceTest extends \TestCase
|
|
{
|
|
public function testIsOrderRowReadyWhenPayStatusPayed(): void
|
|
{
|
|
$svc = new OrderPostPayIntegrationReadinessService();
|
|
$this->assertTrue($svc->isOrderRowReadyForPostPayIntegration([
|
|
'order_status' => 'NOTPAY',
|
|
'pay_status' => 'PAYED',
|
|
]));
|
|
}
|
|
|
|
public function testIsOrderRowReadyWhenOrderStatusDone(): void
|
|
{
|
|
$svc = new OrderPostPayIntegrationReadinessService();
|
|
$this->assertTrue($svc->isOrderRowReadyForPostPayIntegration([
|
|
'order_status' => 'DONE',
|
|
'pay_status' => 'PAYED',
|
|
]));
|
|
}
|
|
|
|
public function testIsOrderRowNotReadyWhenAwaitingPayment(): void
|
|
{
|
|
$svc = new OrderPostPayIntegrationReadinessService();
|
|
$this->assertFalse($svc->isOrderRowReadyForPostPayIntegration([
|
|
'order_status' => 'NOTPAY',
|
|
'pay_status' => 'NOTPAY',
|
|
]));
|
|
}
|
|
|
|
public function testIsOrderRowNotReadyWhenPartPayment(): void
|
|
{
|
|
$svc = new OrderPostPayIntegrationReadinessService();
|
|
$this->assertFalse($svc->isOrderRowReadyForPostPayIntegration([
|
|
'order_status' => 'PART_PAYMENT',
|
|
'pay_status' => 'NOTPAY',
|
|
]));
|
|
}
|
|
}
|