This commit is contained in:
wanghai
2026-06-26 19:20:24 +08:00
parent 2e248de433
commit 058673559c
375 changed files with 34935 additions and 1361 deletions

View File

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