mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 01:55:05 +08:00
36 lines
740 B
PHP
36 lines
740 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* GoodsTest.php@LuxPay
|
|
*
|
|
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
|
* Powered by PhpStorm
|
|
* Created on 2023/7/18
|
|
*/
|
|
|
|
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
use Singularity\HDK\Pay\Resource\Goods;
|
|
use Singularity\HDK\Pay\Sdk\GoodsRpc;
|
|
|
|
test(
|
|
'根据分类和商品名称获取到对应的 SKU',
|
|
/**
|
|
* @throws GuzzleException
|
|
*/
|
|
function () {
|
|
$service = new GoodsRpc('http://192.168.2.218:9611');
|
|
$goods = $service->find(
|
|
1,
|
|
[
|
|
'lattice' => 'TYPE-0',
|
|
'precision' => 'high',
|
|
'mode' => 'gradient',
|
|
],
|
|
);
|
|
expect($goods)->toBeInstanceOf(Goods::class);
|
|
}
|
|
);
|