MDL-30147 dml - one more test behavior without params
This commit is contained in:
committed by
Petr Skoda
parent
8f201c9ded
commit
a8097d6dda
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user