testConnection()
When the “Test Connection” button on the "Admin Area > Services > Service Management > Module Settings > The Module" page is clicked, “controllers/test_connection.php” file that is in module directory is run. In this file, data coming from the form are edited and it is run by sending parameters to setConfig() function.
Later, testConnection() function is run.
You should return boolean (true or false).
public function testConnection(){
if(!$this->api->connect()){
$this->error = $this->api->error;
return false;
}
return true;
}