| @@ 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' => $_SERVER['COUPON_CODE'], |
|
| 24 | 'request' => array( |
|
| 25 | 'user_id' => static::$userId, |
|
| 26 | ), |
|
| 27 | )); |
|
| 28 | static::assertInternalType('array', $actualCouponData); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 48-57 (lines=10) @@ | ||
| 45 | static::assertInternalType('array', $response); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function testListWalletUserOperations() |
|
| 49 | { |
|
| 50 | $response = static::$xsollaClient->ListWalletUserOperations(array( |
|
| 51 | 'project_id' => static::$projectId, |
|
| 52 | 'user_id' => static::$userId, |
|
| 53 | 'datetime_from' => '2015-01-01T00:00:00 UTC', |
|
| 54 | 'datetime_to' => '2016-01-01T00:00:00 UTC', |
|
| 55 | )); |
|
| 56 | static::assertInternalType('array', $response); |
|
| 57 | } |
|
| 58 | ||
| 59 | public function testRechargeWalletUserBalance() |
|
| 60 | { |
|
| @@ 59-70 (lines=12) @@ | ||
| 56 | static::assertInternalType('array', $response); |
|
| 57 | } |
|
| 58 | ||
| 59 | public function testRechargeWalletUserBalance() |
|
| 60 | { |
|
| 61 | $response = static::$xsollaClient->RechargeWalletUserBalance(array( |
|
| 62 | 'project_id' => static::$projectId, |
|
| 63 | 'user_id' => static::$userId, |
|
| 64 | 'request' => array( |
|
| 65 | 'amount' => 10, |
|
| 66 | 'comment' => 'Comment', |
|
| 67 | ), |
|
| 68 | )); |
|
| 69 | static::assertArrayHasKey('amount', $response); |
|
| 70 | } |
|
| 71 | ||
| 72 | public function testAddVirtualItemToWalletUser() |
|
| 73 | { |
|
| @@ 115-124 (lines=10) @@ | ||
| 112 | /** |
|
| 113 | * @depends testAddVirtualItemToWalletUser |
|
| 114 | */ |
|
| 115 | public function testListWalletUserVirtualItems() |
|
| 116 | { |
|
| 117 | $response = static::$xsollaClient->ListWalletUserVirtualItems(array( |
|
| 118 | 'project_id' => static::$projectId, |
|
| 119 | 'user_id' => static::$userId, |
|
| 120 | 'limit' => 1, |
|
| 121 | 'offset' => 0, |
|
| 122 | )); |
|
| 123 | static::assertInternalType('array', $response); |
|
| 124 | } |
|
| 125 | ||
| 126 | /** |
|
| 127 | * @depends testAddVirtualItemToWalletUser |
|