| @@ 220-238 (lines=19) @@ | ||
| 217 | static::assertSame($gigyaResponse, $result); |
|
| 218 | } |
|
| 219 | ||
| 220 | public function testSettingDataCenterToAuWillCallAuUri() |
|
| 221 | { |
|
| 222 | $gigyaResponse = $this->setupCall( |
|
| 223 | 'accounts.getAccountInfo', |
|
| 224 | 'https://accounts.au1.gigya.com/accounts.getAccountInfo', |
|
| 225 | [ |
|
| 226 | 'auth' => 'gigya', |
|
| 227 | 'verify' => $this->certPath, |
|
| 228 | 'query' => [], |
|
| 229 | ], |
|
| 230 | 'key', |
|
| 231 | 'secret' |
|
| 232 | ); |
|
| 233 | $client = $this->createClient('key', 'secret', Gigya::DC_AU); |
|
| 234 | ||
| 235 | $result = $client->accounts()->getAccountInfo([]); |
|
| 236 | ||
| 237 | static::assertSame($gigyaResponse, $result); |
|
| 238 | } |
|
| 239 | ||
| 240 | public function testSettingDataCenterToUsWillCallUsUri() |
|
| 241 | { |
|
| @@ 240-258 (lines=19) @@ | ||
| 237 | static::assertSame($gigyaResponse, $result); |
|
| 238 | } |
|
| 239 | ||
| 240 | public function testSettingDataCenterToUsWillCallUsUri() |
|
| 241 | { |
|
| 242 | $gigyaResponse = $this->setupCall( |
|
| 243 | 'accounts.getAccountInfo', |
|
| 244 | 'https://accounts.us1.gigya.com/accounts.getAccountInfo', |
|
| 245 | [ |
|
| 246 | 'auth' => 'gigya', |
|
| 247 | 'verify' => $this->certPath, |
|
| 248 | 'query' => [], |
|
| 249 | ], |
|
| 250 | 'key', |
|
| 251 | 'secret' |
|
| 252 | ); |
|
| 253 | $client = $this->createClient('key', 'secret', Gigya::DC_US); |
|
| 254 | ||
| 255 | $result = $client->accounts()->getAccountInfo([]); |
|
| 256 | ||
| 257 | static::assertSame($gigyaResponse, $result); |
|
| 258 | } |
|
| 259 | ||
| 260 | public function testSettingTheUserKeyWillPassItThroughToGuzzle() |
|
| 261 | { |
|
| @@ 260-280 (lines=21) @@ | ||
| 257 | static::assertSame($gigyaResponse, $result); |
|
| 258 | } |
|
| 259 | ||
| 260 | public function testSettingTheUserKeyWillPassItThroughToGuzzle() |
|
| 261 | { |
|
| 262 | $gigyaResponse = $this->setupCall( |
|
| 263 | 'accounts.getAccountInfo', |
|
| 264 | 'https://accounts.eu1.gigya.com/accounts.getAccountInfo', |
|
| 265 | [ |
|
| 266 | 'auth' => 'gigya', |
|
| 267 | 'verify' => $this->certPath, |
|
| 268 | 'query' => [], |
|
| 269 | ], |
|
| 270 | 'key', |
|
| 271 | 'userSecret', |
|
| 272 | 'userKey' |
|
| 273 | ); |
|
| 274 | $client = $this->createClient('key', 'userSecret', Gigya::DC_EU, 'userKey'); |
|
| 275 | $client->setFactory($this->factory); |
|
| 276 | ||
| 277 | $result = $client->accounts()->getAccountInfo([]); |
|
| 278 | ||
| 279 | static::assertSame($gigyaResponse, $result); |
|
| 280 | } |
|
| 281 | ||
| 282 | public function testPassingParamsThroughToTheMethodWillPassThroughToGuzzle() |
|
| 283 | { |
|