|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Xsolla\SDK\Tests\Integration\API; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* @group api |
|
7
|
|
|
*/ |
|
8
|
|
|
class ReportsTest extends AbstractAPITest |
|
9
|
|
|
{ |
|
10
|
|
View Code Duplication |
public function testSearchPaymentsRegistry() |
|
|
|
|
|
|
11
|
|
|
{ |
|
12
|
|
|
$response = static::$xsollaClient->SearchPaymentsRegistry(array( |
|
13
|
|
|
'format' => 'json', |
|
14
|
|
|
'type' => 'all', |
|
15
|
|
|
'limit' => 2, |
|
16
|
|
|
'offset' => 0, |
|
17
|
|
|
)); |
|
18
|
|
|
static::assertInternalType('array', $response); |
|
19
|
|
|
} |
|
20
|
|
|
|
|
21
|
|
View Code Duplication |
public function testSearchPaymentsRegistryWithParams() |
|
|
|
|
|
|
22
|
|
|
{ |
|
23
|
|
|
$response = static::$xsollaClient->SearchPaymentsRegistry(array( |
|
24
|
|
|
'format' => 'json', |
|
25
|
|
|
'type' => 'all', |
|
26
|
|
|
'limit' => 2, |
|
27
|
|
|
'offset' => 0, |
|
28
|
|
|
'status' => 'created' |
|
29
|
|
|
)); |
|
30
|
|
|
static::assertInternalType('array', $response); |
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
View Code Duplication |
public function testListPaymentsRegistry() |
|
|
|
|
|
|
34
|
|
|
{ |
|
35
|
|
|
$response = static::$xsollaClient->ListPaymentsRegistry(array( |
|
36
|
|
|
'format' => 'json', |
|
37
|
|
|
'datetime_from' => '2015-01-01T00:00:00Z', |
|
38
|
|
|
'datetime_to' => '2015-01-02T00:00:00Z', |
|
39
|
|
|
'in_transfer_currency' => false, |
|
40
|
|
|
'limit' => 2, |
|
41
|
|
|
'offset' => 0, |
|
42
|
|
|
'show_total' => true, |
|
43
|
|
|
)); |
|
44
|
|
|
static::assertInternalType('array', $response); |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
View Code Duplication |
public function testListPaymentsRegistryWithParams() |
|
|
|
|
|
|
48
|
|
|
{ |
|
49
|
|
|
$response = static::$xsollaClient->ListPaymentsRegistry(array( |
|
50
|
|
|
'format' => 'json', |
|
51
|
|
|
'datetime_from' => '2015-01-01T00:00:00Z', |
|
52
|
|
|
'datetime_to' => '2015-01-02T00:00:00Z', |
|
53
|
|
|
'in_transfer_currency' => false, |
|
54
|
|
|
'limit' => 2, |
|
55
|
|
|
'offset' => 0, |
|
56
|
|
|
'show_total' => true, |
|
57
|
|
|
'status' => 'done' |
|
58
|
|
|
)); |
|
59
|
|
|
static::assertInternalType('array', $response); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
public function testListTransfersRegistry() |
|
63
|
|
|
{ |
|
64
|
|
|
$response = static::$xsollaClient->ListTransfersRegistry(); |
|
65
|
|
|
static::assertInternalType('array', $response); |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
public function testListReportsRegistry() |
|
69
|
|
|
{ |
|
70
|
|
|
$response = static::$xsollaClient->ListReportsRegistry(); |
|
71
|
|
|
static::assertInternalType('array', $response); |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
public function testCreateRefundRequest() |
|
75
|
|
|
{ |
|
76
|
|
|
static::markTestIncomplete('We haven\'t payments in test account for refund testing.'); |
|
77
|
|
|
} |
|
78
|
|
|
} |
|
79
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.