dblayer : add more unittests
dblayer : add compatibility in column names with MySQL and SQLite git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1812 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -33,9 +33,16 @@ class test_dblayer_{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
$db = new dblayer ($dbconfig["dsn"], $dbconfig["username"],
|
||||
$dbconfig["password"], $dbconfig["driver_options"]);
|
||||
$db->table = "grouped";
|
||||
$this->setExpectedException ("Exception");
|
||||
$res = $db->dropTable();
|
||||
// Never generate an error
|
||||
try
|
||||
{
|
||||
$res = $db->dropTable();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
}
|
||||
// Never generate an error, just drop the table if it exists, and do noting
|
||||
// if it doesn't exists
|
||||
}
|
||||
|
||||
public function test_createTable ()
|
||||
@@ -68,7 +75,8 @@ class test_dblayer_{ENGINE} extends PHPUnit_Framework_TestCase
|
||||
"object"=>"/éobj%",
|
||||
"where"=>"\$'\"",
|
||||
"with space"=>"with space"));
|
||||
$this->assertSame ("1", $res);
|
||||
// SQLite start at 1, MySQL start at 0...
|
||||
$this->assertThat($res, $this->lessThanOrEqual(1));
|
||||
}
|
||||
|
||||
public function test_read1 ()
|
||||
|
||||
Reference in New Issue
Block a user