This repository has been archived by the owner on Aug 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathContractTest.php
62 lines (54 loc) · 1.85 KB
/
ContractTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* Author: <easy> [email protected]
* Date: 2019/6/17 下午3:08
*/
namespace KuMEX\SDK\Tests;
use \KuMEX\SDK\PublicApi\Contract;
class ContractTest extends TestCase
{
protected $apiClass = Contract::class;
protected $apiWithAuth = false;
/**
*
* @depends testGetList
* @param Contract $api
* @throws \KuMEX\SDK\Exceptions\BusinessException
* @throws \KuMEX\SDK\Exceptions\HttpException
* @throws \KuMEX\SDK\Exceptions\InvalidApiUriException
*/
public function testGetList(Contract $api)
{
$data = $api->getList();
$this->assertInternalType('array', $data);
$this->assertArrayHasKey('currency', $data);
$this->assertArrayHasKey('status', $data);
$this->assertArrayHasKey('address', $data);
$this->assertArrayHasKey('isInner', $data);
$this->assertArrayHasKey('amount', $data);
$this->assertArrayHasKey('fee', $data);
$this->assertArrayHasKey('walletTxId', $data);
$this->assertArrayHasKey('createdAt', $data);
}
/**
*
* @depends testGetDetail
* @param Contract $api
* @throws \KuMEX\SDK\Exceptions\BusinessException
* @throws \KuMEX\SDK\Exceptions\HttpException
* @throws \KuMEX\SDK\Exceptions\InvalidApiUriException
*/
public function testGetDetail(Contract $api)
{
$data = $api->getDetail('XBTUSDM');
$this->assertInternalType('array', $data);
$this->assertArrayHasKey('currency', $data);
$this->assertArrayHasKey('status', $data);
$this->assertArrayHasKey('address', $data);
$this->assertArrayHasKey('isInner', $data);
$this->assertArrayHasKey('amount', $data);
$this->assertArrayHasKey('fee', $data);
$this->assertArrayHasKey('walletTxId', $data);
$this->assertArrayHasKey('createdAt', $data);
}
}