mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 07:35:09 +08:00
27 lines
601 B
PHP
27 lines
601 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
/**
|
||
|
|
* CreateRechargeOrderTest.php@Pay
|
||
|
|
*
|
||
|
|
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
||
|
|
* Powered by PhpStorm
|
||
|
|
* Created on 2025/8/18
|
||
|
|
*/
|
||
|
|
|
||
|
|
use Singularity\HDK\Pay\Application\Dto\Transaction\RechargeDto;
|
||
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\OrderRepo;
|
||
|
|
|
||
|
|
use function Hyperf\Support\make;
|
||
|
|
|
||
|
|
it('should can create recharge order', function () {
|
||
|
|
$uid = 'cn3321';
|
||
|
|
$items = [
|
||
|
|
'product_id' => 1,
|
||
|
|
'quantity' => 2,
|
||
|
|
];
|
||
|
|
|
||
|
|
$repo = make(OrderRepo::class);
|
||
|
|
$result = $repo->recharge($uid, [$items]);
|
||
|
|
expect($result)->toBeInstanceOf(RechargeDto::class);
|
||
|
|
});
|