mirror of
https://gitee.com/ShopeX/ECShopX
synced 2026-08-05 19:55:51 +08:00
4.7.0
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?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',
|
||||
]));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user