Files
hdk-pay/tests/Unit/GoodsTest.php

36 lines
748 B
PHP
Raw Permalink Normal View History

<?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 () {
2024-02-27 15:25:18 +08:00
$service = new GoodsRpc('http://192.168.2.246:9611');
$goods = $service->find(
1,
[
'lattice' => 'TYPE-0',
'precision' => 'high',
'mode' => 'gradient',
],
);
expect($goods)->toBeInstanceOf(Goods::class);
}
)->skip();