public function testCanLoginEnc()
 {
     //config
     $config = ConfigDistributor::getInstance()->getConfig();
     //create object
     $allegroApi = new AllegroApi($config);
     //test plain login
     // ok, if no exception
     $throwException = false;
     try {
         $allegroApi->loginEnc();
     } catch (Exception $ex) {
         $throwException = true;
     }
     //no throw a exception if success
     $this->assertEquals(false, $throwException);
 }
示例#2
0
 public function testCanLoginEnc()
 {
     // config
     $config = ConfigDistributor::getInstance()->getConfig();
     // create an object
     $allegroApi = new AllegroApi($config->login, $config->hashPassword, $config->apikey, $config->sandbox, $config->countryCode);
     /**
      * test plain login
      * ok, if no exception
      */
     $throwsException = false;
     try {
         $allegroApi->loginEnc();
     } catch (Exception $ex) {
         $throwsException = true;
     }
     // doesn't throw an exception on success
     $this->assertEquals(false, $throwsException);
 }