-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathTokensTest.php
More file actions
51 lines (41 loc) · 1.55 KB
/
TokensTest.php
File metadata and controls
51 lines (41 loc) · 1.55 KB
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
<?php
declare(strict_types=1);
namespace ArkEcosystem\Tests\Client\API;
use ArkEcosystem\Client\ArkClient;
it('calls correct url for all', function () {
$this->assertResponse('GET', 'tokens', function (ArkClient $client) {
return $client->tokens()->all();
});
});
it('calls correct url for all with whitelist', function () {
$this->assertResponse('POST', 'tokens', function (ArkClient $client) {
return $client->tokens()->allWithWhitelist([
'whitelist' => ['0x1234567890abcdef1234567890abcdef12345678'],
]);
});
});
it('calls correct url for get', function () {
$this->assertResponse('GET', 'tokens/dummy', function (ArkClient $client) {
return $client->tokens()->get('dummy');
});
});
it('calls correct url for holders', function () {
$this->assertResponse('GET', 'tokens/dummy/holders', function (ArkClient $client) {
return $client->tokens()->holders('dummy');
});
});
it('calls correct url for transfers by token', function () {
$this->assertResponse('GET', 'tokens/dummy/transfers', function (ArkClient $client) {
return $client->tokens()->transfersByToken('dummy');
});
});
it('calls correct url for all transfers', function () {
$this->assertResponse('GET', 'tokens/transfers', function (ArkClient $client) {
return $client->tokens()->transfers();
});
});
it('calls correct url for whitelist', function () {
$this->assertResponse('GET', 'tokens/whitelist', function (ArkClient $client) {
return $client->tokens()->whitelist();
});
});