Files
ECShopX/tests/OrdersBundle/OrderPostPayIntegrationReadinessServiceTest.php
wanghai 058673559c 4.7.0
2026-06-26 19:20:24 +08:00

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',
]));
}
}