Exemple #1
0
 public function run()
 {
     $methods = get_class_methods($this);
     foreach ($methods as $method) {
         if (strpos($method, 'test') === 0) {
             try {
                 // use the client logger interface to log
                 $this->_client->getConfig()->getLogger()->log('Running ' . $method);
                 $this->{$method}();
             } catch (Exception $ex) {
                 $this->_client->getConfig()->getLogger()->log($method . ' failed with error: ' . $ex->getMessage());
                 return;
             }
         }
     }
     echo "\nFinished running client library tests\n";
 }
 public function registerPartner($partner)
 {
     $config = $this->_client->getConfig();
     $this->_client->setKs(null);
     $config->partnerId = null;
     $oldTimeout = $config->curlTimeout;
     $config->curlTimeout = 40;
     $result = $this->_client->partner->register($partner);
     $config->curlTimeout = $oldTimeout;
     return $result;
 }