mirror of
https://github.com/e107inc/e107.git
synced 2025-04-14 09:32:17 +02:00
More PDO tests.
This commit is contained in:
parent
c9981cda78
commit
17eff8de71
@ -65,15 +65,14 @@
|
||||
|
||||
public function testGetMode()
|
||||
{
|
||||
|
||||
$actual = $this->db->getMode();
|
||||
$this->assertEquals('NO_ENGINE_SUBSTITUTION', $actual);
|
||||
}
|
||||
|
||||
public function testDb_Connect()
|
||||
{
|
||||
$result = $this->db->db_Connect($this->dbConfig['mySQLserver'], $this->dbConfig['mySQLuser'], $this->dbConfig['mySQLpassword'], $this->dbConfig['mySQLdefaultdb']);
|
||||
$this->assertTrue($result);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -240,14 +239,25 @@
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
public function testDb_Mark_Time()
|
||||
{
|
||||
$this->db->debugMode(true);
|
||||
|
||||
$this->db->db_Mark_Time("Testing");
|
||||
|
||||
$actual = e107::getDebug()->getTimeMarkers();
|
||||
|
||||
$this->assertIsArray($actual);
|
||||
$this->assertEquals('Testing', $actual[1]['What']);
|
||||
$this->assertArrayHasKey('Index', $actual[1]);
|
||||
$this->assertArrayHasKey('Time', $actual[1]);
|
||||
$this->assertArrayHasKey('Memory', $actual[1]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
public function testDb_Write_log()
|
||||
{
|
||||
$log_type = 127;
|
||||
@ -353,12 +363,25 @@
|
||||
$actual = $this->db->retrieve('tmp', '*','tmp_ip = "127.0.0.1" AND tmp_time = 12345435');
|
||||
$this->assertEquals($expected, $actual, 'Inserted content doesn\'t match the retrieved content');
|
||||
}
|
||||
/*
|
||||
|
||||
public function testLastInsertId()
|
||||
{
|
||||
$insert = array(
|
||||
'gen_id' => 0,
|
||||
'gen_type' => 'whatever',
|
||||
'gen_datestamp' => time(),
|
||||
'gen_user_id' => 1,
|
||||
'gen_ip' => '127.0.0.1',
|
||||
'gen_intdata' => '',
|
||||
'gen_chardata' => ''
|
||||
);
|
||||
|
||||
$this->db->insert('generic', $insert);
|
||||
$actual = $this->db->lastInsertId();
|
||||
$this->assertEquals(2,$actual);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
public function testFoundRows()
|
||||
{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user