MDL-30147 dml - one more test behavior without params

This commit is contained in:
Eloy Lafuente (stronk7)
2011-11-19 09:27:09 +01:00
committed by Petr Skoda
parent 8f201c9ded
commit a8097d6dda
+9
View File
@@ -1267,6 +1267,7 @@ class dml_test extends UnitTestCase {
}
// test get_records passing non-existing table
// with params
try {
$records = $DB->get_records('xxxx', array('id' => 0));
$this->fail('An Exception is missing, expected due to query against non-existing table');
@@ -1274,6 +1275,14 @@ class dml_test extends UnitTestCase {
$this->assertTrue($e instanceof dml_exception);
$this->assertEqual($e->errorcode, 'ddltablenotexist');
}
// and without params
try {
$records = $DB->get_records('xxxx', array());
$this->fail('An Exception is missing, expected due to query against non-existing table');
} catch (exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertEqual($e->errorcode, 'ddltablenotexist');
}
// test get_records passing non-existing column
try {