mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 07:15:06 +08:00
39 lines
809 B
PHP
39 lines
809 B
PHP
<?php
|
|
|
|
/**
|
|
* QueryPointRateTest.php@Pay
|
|
*
|
|
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
|
* Powered by PhpStorm
|
|
* Created on 2025/8/18
|
|
*/
|
|
|
|
use Singularity\HDK\Pay\Domain\Account\Enum\PointType;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\ProductRepo;
|
|
|
|
use function Hyperf\Support\make;
|
|
|
|
it('can query point rate', function () {
|
|
$repo = make(ProductRepo::class);
|
|
|
|
$from = PointType::FtaiAligner;
|
|
$to = PointType::LuxPoint;
|
|
|
|
$uid = 'cn3321';
|
|
|
|
$rate = $repo->getRate($from, $to, $uid);
|
|
expect($rate)->toBeFloat();
|
|
});
|
|
|
|
it('can query point rate with uid', function () {
|
|
$repo = make(ProductRepo::class);
|
|
|
|
$from = PointType::FtaiAligner;
|
|
$to = PointType::LuxPoint;
|
|
|
|
$uid = 'cn3321';
|
|
|
|
$rate = $repo->getRate($from, $to, $uid);
|
|
expect($rate)->toBeFloat();
|
|
});
|