mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 07:15:06 +08:00
- 新增 PointPrice 值对象用于表示金额与货币符号 - 修改 InvoiceProduct 结构以支持多个 PointPrice 实例 - 更新 InvoiceProductRepo 以映射数据库中的价格数据 - 在测试中验证 prices 字段的正确性和类型安全
30 lines
829 B
PHP
30 lines
829 B
PHP
<?php
|
|
|
|
/**
|
|
* QueryCaseInvoiceProductTest.php@Pay
|
|
*
|
|
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
|
* Powered by PhpStorm
|
|
* Created on 2025/8/28
|
|
*/
|
|
|
|
|
|
use Singularity\HDK\Pay\Domain\Invoice\Aggregate\Invoice\InvoiceProduct;
|
|
use Singularity\HDK\Pay\Domain\Invoice\Aggregate\Invoice\ValueObject\PointPrice;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\InvoiceProductRepo;
|
|
|
|
use function Hyperf\Support\make;
|
|
|
|
it('should can query case invoice product', function () {
|
|
/** @var InvoiceProductRepo $invoiceProductRepo */
|
|
$invoiceProductRepo = make(InvoiceProductRepo::class);
|
|
|
|
$caseId = '68affb136c01d';
|
|
|
|
$result = $invoiceProductRepo->getCaseProduct(caseId: $caseId);
|
|
|
|
expect($result)->toBeInstanceOf(InvoiceProduct::class)
|
|
->prices->toBeArray()
|
|
->each->toBeInstanceOf(PointPrice::class);
|
|
});
|