1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

PDO tests

This commit is contained in:
Cameron
2019-02-11 16:57:11 -08:00
parent 3786ced51f
commit f54feed09b

View File

@@ -117,6 +117,12 @@
$result = $this->db->database("missing_database");
$this->assertFalse($result);
$result = $this->db->database($this->dbConfig['mySQLdefaultdb'], MPREFIX, true);
$this->assertTrue($result);
$this->assertEquals("`e107_tests`.e107_", $this->db->mySQLPrefix);
}
public function testGetCharSet()
@@ -147,6 +153,11 @@
$this->assertArrayHasKey('Time', $actual[1]);
$this->assertArrayHasKey('Memory', $actual[1]);
$this->db->debugMode(false);
$result = $this->db->db_Mark_Time("Testing");
$this->assertNull($result);
}
@@ -217,7 +228,7 @@
$this->assertEquals($expected,$result);
$expected = array ( 0 => array ( 'user_id' => '1', 'user_name' => 'e107', ),);
$expected = array ( 0 => array ( 'user_id' => '1', 'user_name' => 'e107', ),);
$result = $this->db->retrieve('user', 'user_id, user_name', 'user_id = 1', true);
$this->assertEquals($expected,$result);