/** * @return a Client object */ public static function getClient($token) { $client = Client::getInstance($token); if (GoCoin::getApiMode() == 'test') { $client->options['host'] = GoCoin::TEST_HOST; $client->options['dashboard_host'] = GoCoin::TEST_DASHBOARD_HOST; } return $client; }
public function testGetMerchantUsers() { if (!$this->doTest(__FUNCTION__)) { return; } //perform assertion $this->assertEquals(GoCoin::getApiMode(), 'test'); $this->assertNotEmpty(TOKEN); //get a list of all merchant users $users = GoCoin::getMerchantUsers(TOKEN, MERCHANT_ID); $this->assertGreaterThanOrEqual(1, sizeof($users)); $this->assertEquals($users[0]->id, USER_ID); echo '[DEBUG]: SUCCESS: ' . sizeof($users) . ' - ' . $users[0]->id . "\n"; }