Better Firebird test coverage

This commit is contained in:
Timothy Warren 2014-02-20 11:00:18 -05:00
parent 003991659a
commit 81692053ed
1 changed files with 54 additions and 0 deletions

View File

@ -62,6 +62,29 @@ class FirebirdTest extends DBtest {
// --------------------------------------------------------------------------
public function testResultErrors()
{
$obj = $this->db->query('SELECT "id" FROM "create_test"');
// Test row count
$this->assertEqual(0, $obj->rowCount());
// Test error code
$this->assertFalse($obj->errorCode());
// Test error info
$error = $obj->errorInfo();
$expected = array (
0 => 0,
1 => false,
2 => false,
);
$this->assertEqual($expected, $error);
}
// --------------------------------------------------------------------------
public function testExists()
{
$this->assertTrue(function_exists('ibase_connect'));
@ -256,4 +279,35 @@ SQL;
{
$this->assertTrue(is_array($this->db->get_triggers()));
}
// --------------------------------------------------------------------------
public function testErrorInfo()
{
$result = $this->db->errorInfo();
$expected = array (
0 => 0,
1 => false,
2 => false,
);
$this->assertEqual($expected, $result);
}
// --------------------------------------------------------------------------
public function testErrorCode()
{
$result = $this->db->errorCode();
$this->assertFalse($result);
}
// --------------------------------------------------------------------------
public function testDBList()
{
$res = $this->db->sql->db_list();
$this->assertNULL($res);
}
}