/** * @see MerchantCredentials::setApiUrl() */ public function testSetApiUrlNewInstance() { $this->object = new MerchantCredentials(); $apiUrl = 'apiUrl_' . rand(1, 1000); $rs = $this->object->setApiUrl($apiUrl); $this->assertInstanceOf('\\PayU\\Merchant\\MerchantCredentials', $rs); $rs = $this->object->getApiUrl(); $this->assertInternalType('string', $rs); $this->assertEquals($apiUrl, $rs); }
/** * Get the api url. * @return string */ public function getApiUrl() { $apiUrl = $this->credentials->getApiUrl(); if (strlen($apiUrl)) { return $apiUrl; } if ($this->isProduction()) { return $this->apiUrlProduction; } else { return $this->apiUrlStaging; } }