1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-14 09:32:17 +02:00

connect() test.

This commit is contained in:
Cameron 2019-02-09 15:22:27 -08:00
parent 42f059556c
commit 2a62cbc561

View File

@ -72,15 +72,23 @@
{
$result = $this->db->db_Connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword'], $this->dbConfig['mySQLdefaultdb']);
$this->assertTrue($result);
}
/**
* TODO
* connect() test.
*/
public function testConnect()
{
$result = $this->db->connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], "wrong Password");
$this->assertFalse($result);
$result = $this->db->connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword']);
$this->assertTrue($result);
$result = $this->db->connect($this->dbConfig['mySQLserver'].":3306", $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword']);
$this->assertTrue($result);
}
/**