public function testOneRemoveGeneralException()
 {
     $db = (require __DIR__ . "/config.php");
     $mysqlConnections = MysqlConnections::getInstance();
     $obj = new Mysqltcs($db['host'], $db['user'], $db['psw'], $db['db']);
     $mysqlConnections->getConnection($obj, $db['host'], $db['user'], $db['psw'], $db['db']);
     $mysqlConnections->removeClient($obj);
     $this->setExpectedException('\\it\\thecsea\\mysqltcs\\MysqltcsException');
     $mysqlConnections->removeClient($obj);
 }
Exemple #2
0
 /**
  * Get the connection according to newConnection value
  * @throws MysqlConnectionException
  */
 private function getConnection()
 {
     if ($this->newConnection) {
         $this->mysqlRef = new MysqlConnection($this->host, $this->user, $this->password, $this->name, $this->key, $this->cert, $this->ca);
         $this->mysqlRef->connect();
     } else {
         $this->mysqlRef = $this->mysqlConnections->getConnection($this, $this->host, $this->user, $this->password, $this->name, $this->key, $this->cert, $this->ca);
     }
     $this->mysqliRef = $this->mysqlRef->getMysqli();
 }