@@ 19-29 (lines=11) @@ | ||
16 | static::assertInternalType('array', $actualCouponData); |
|
17 | } |
|
18 | ||
19 | public function testRedeemCoupon() |
|
20 | { |
|
21 | $actualCouponData = static::$xsollaClient->RedeemCoupon(array( |
|
22 | 'project_id' => static::$projectId, |
|
23 | 'code' => getenv('COUPON_CODE'), |
|
24 | 'request' => array( |
|
25 | 'user_id' => static::$userId, |
|
26 | ), |
|
27 | )); |
|
28 | static::assertInternalType('array', $actualCouponData); |
|
29 | } |
|
30 | } |
|
31 |
@@ 13-24 (lines=12) @@ | ||
10 | const LANGUAGE = 'en'; |
|
11 | const CURRENCY = 'USD'; |
|
12 | ||
13 | public function testGetStorefrontVirtualCurrency() |
|
14 | { |
|
15 | $response = static::$xsollaClient->GetStorefrontVirtualCurrency( |
|
16 | array( |
|
17 | 'project_id' => static::$projectId, |
|
18 | 'user_id' => static::$userId, |
|
19 | 'language' => self::LANGUAGE, |
|
20 | 'currency' => self::CURRENCY, |
|
21 | ) |
|
22 | ); |
|
23 | static::assertInternalType('array', $response); |
|
24 | } |
|
25 | ||
26 | public function testGetStorefrontVirtualGroups() |
|
27 | { |
|
@@ 26-37 (lines=12) @@ | ||
23 | static::assertInternalType('array', $response); |
|
24 | } |
|
25 | ||
26 | public function testGetStorefrontVirtualGroups() |
|
27 | { |
|
28 | $response = static::$xsollaClient->GetStorefrontVirtualGroups( |
|
29 | array( |
|
30 | 'project_id' => static::$projectId, |
|
31 | 'user_id' => static::$userId, |
|
32 | 'language' => self::LANGUAGE, |
|
33 | 'currency' => self::CURRENCY, |
|
34 | ) |
|
35 | ); |
|
36 | static::assertInternalType('array', $response); |
|
37 | } |
|
38 | ||
39 | public function testGetStorefrontVirtualItems() |
|
40 | { |
|
@@ 39-51 (lines=13) @@ | ||
36 | static::assertInternalType('array', $response); |
|
37 | } |
|
38 | ||
39 | public function testGetStorefrontVirtualItems() |
|
40 | { |
|
41 | $response = static::$xsollaClient->GetStorefrontVirtualItems( |
|
42 | array( |
|
43 | 'project_id' => static::$projectId, |
|
44 | 'user_id' => static::$userId, |
|
45 | 'language' => self::LANGUAGE, |
|
46 | 'currency' => self::CURRENCY, |
|
47 | 'group_id' => 7, |
|
48 | ) |
|
49 | ); |
|
50 | static::assertInternalType('array', $response); |
|
51 | } |
|
52 | ||
53 | public function testGetStorefrontSubscriptions() |
|
54 | { |
|
@@ 53-64 (lines=12) @@ | ||
50 | static::assertInternalType('array', $response); |
|
51 | } |
|
52 | ||
53 | public function testGetStorefrontSubscriptions() |
|
54 | { |
|
55 | $response = static::$xsollaClient->GetStorefrontSubscriptions( |
|
56 | array( |
|
57 | 'project_id' => static::$projectId, |
|
58 | 'user_id' => static::$userId, |
|
59 | 'language' => self::LANGUAGE, |
|
60 | 'currency' => self::CURRENCY, |
|
61 | ) |
|
62 | ); |
|
63 | static::assertInternalType('array', $response); |
|
64 | } |
|
65 | ||
66 | public function testGetStorefrontBonus() |
|
67 | { |
|
@@ 66-77 (lines=12) @@ | ||
63 | static::assertInternalType('array', $response); |
|
64 | } |
|
65 | ||
66 | public function testGetStorefrontBonus() |
|
67 | { |
|
68 | $response = static::$xsollaClient->GetStorefrontBonus( |
|
69 | array( |
|
70 | 'project_id' => static::$projectId, |
|
71 | 'user_id' => static::$userId, |
|
72 | 'language' => self::LANGUAGE, |
|
73 | 'currency' => self::CURRENCY, |
|
74 | ) |
|
75 | ); |
|
76 | static::assertInternalType('array', $response); |
|
77 | } |
|
78 | } |
|
79 |
@@ 191-200 (lines=10) @@ | ||
188 | static::assertInternalType('array', $response); |
|
189 | } |
|
190 | ||
191 | public function testListSubscriptionWithParams() |
|
192 | { |
|
193 | $response = static::$xsollaClient->ListSubscriptions(array( |
|
194 | 'project_id' => static::$projectId, |
|
195 | 'user_id' => static::$userId, |
|
196 | 'plan_id' => static::$planId, |
|
197 | 'product_id' => static::$productId, |
|
198 | )); |
|
199 | static::assertInternalType('array', $response); |
|
200 | } |
|
201 | ||
202 | public function testListUserSubscriptionPayments() |
|
203 | { |
@@ 53-62 (lines=10) @@ | ||
50 | static::assertInternalType('array', $response); |
|
51 | } |
|
52 | ||
53 | public function testListVirtualItemsWithParams() |
|
54 | { |
|
55 | $response = static::$xsollaClient->ListVirtualItems(array( |
|
56 | 'project_id' => static::$projectId, |
|
57 | 'offset' => 0, |
|
58 | 'limit' => 100, |
|
59 | 'has_price' => 'virtual_currency', |
|
60 | )); |
|
61 | static::assertInternalType('array', $response); |
|
62 | } |
|
63 | ||
64 | public function testCreateVirtualItemsGroup() |
|
65 | { |
@@ 48-57 (lines=10) @@ | ||
45 | static::assertInternalType('array', $response); |
|
46 | } |
|
47 | ||
48 | public function testListWalletUsersWithParams() |
|
49 | { |
|
50 | $response = static::$xsollaClient->ListWalletUsers(array( |
|
51 | 'project_id' => static::$projectId, |
|
52 | 'limit' => 1, |
|
53 | 'offset' => 0, |
|
54 | 'user_requisites' => static::$userId, |
|
55 | )); |
|
56 | static::assertInternalType('array', $response); |
|
57 | } |
|
58 | ||
59 | public function testListWalletUserOperations() |
|
60 | { |
|
@@ 59-68 (lines=10) @@ | ||
56 | static::assertInternalType('array', $response); |
|
57 | } |
|
58 | ||
59 | public function testListWalletUserOperations() |
|
60 | { |
|
61 | $response = static::$xsollaClient->ListWalletUserOperations(array( |
|
62 | 'project_id' => static::$projectId, |
|
63 | 'user_id' => static::$userId, |
|
64 | 'datetime_from' => '2015-01-01T00:00:00Z', |
|
65 | 'datetime_to' => '2016-01-01T00:00:00Z', |
|
66 | )); |
|
67 | static::assertInternalType('array', $response); |
|
68 | } |
|
69 | ||
70 | public function testListWalletUserOperationsWithParams() |
|
71 | { |
|
@@ 82-93 (lines=12) @@ | ||
79 | static::assertInternalType('array', $response); |
|
80 | } |
|
81 | ||
82 | public function testRechargeWalletUserBalance() |
|
83 | { |
|
84 | $response = static::$xsollaClient->RechargeWalletUserBalance(array( |
|
85 | 'project_id' => static::$projectId, |
|
86 | 'user_id' => static::$userId, |
|
87 | 'request' => array( |
|
88 | 'amount' => 10, |
|
89 | 'comment' => 'Comment', |
|
90 | ), |
|
91 | )); |
|
92 | static::assertArrayHasKey('amount', $response); |
|
93 | } |
|
94 | ||
95 | public function testAddVirtualItemToWalletUser() |
|
96 | { |
|
@@ 124-133 (lines=10) @@ | ||
121 | /** |
|
122 | * @depends testAddVirtualItemToWalletUser |
|
123 | */ |
|
124 | public function testListWalletUserVirtualItems() |
|
125 | { |
|
126 | $response = static::$xsollaClient->ListWalletUserVirtualItems(array( |
|
127 | 'project_id' => static::$projectId, |
|
128 | 'user_id' => static::$userId, |
|
129 | 'limit' => 1, |
|
130 | 'offset' => 0, |
|
131 | )); |
|
132 | static::assertInternalType('array', $response); |
|
133 | } |
|
134 | ||
135 | /** |
|
136 | * @depends testAddVirtualItemToWalletUser |