public function testCanLogin() { //config $config = ConfigDistributor::getInstance()->getConfig(); //create object $allegroApi = new AllegroApi($config); //test plain login // ok, if no exception $throwException = false; try { $allegroApi->login(); } catch (Exception $ex) { $throwException = true; } //no throw a exception if success $this->assertEquals(false, $throwException); }