mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-23997 more unittests detecting failures in sqlsrv driver
This commit is contained in:
parent
72c75d1a05
commit
057865c017
@ -2850,7 +2850,10 @@ class dml_test extends UnitTestCase {
|
||||
$this->assertTrue($DB->insert_record($tablename, array('name' => 'cc', 'content'=>'sometext')));
|
||||
|
||||
|
||||
// Conditions in CHAR colums
|
||||
// Conditions in CHAR columns
|
||||
$this->assertTrue($DB->record_exists($tablename, array('name'=>1)));
|
||||
$this->assertTrue($DB->record_exists($tablename, array('name'=>'1')));
|
||||
$this->assertFalse($DB->record_exists($tablename, array('name'=>111)));
|
||||
$sqlqm = "SELECT *
|
||||
FROM {{$tablename}}
|
||||
WHERE name = ?";
|
||||
@ -2858,6 +2861,8 @@ class dml_test extends UnitTestCase {
|
||||
$this->assertEqual(1, count($records));
|
||||
$this->assertTrue($records = $DB->get_records_sql($sqlqm, array('1')));
|
||||
$this->assertEqual(1, count($records));
|
||||
$records = $DB->get_records_sql($sqlqm, array(222));
|
||||
$this->assertEqual(0, count($records));
|
||||
$sqlnamed = "SELECT *
|
||||
FROM {{$tablename}}
|
||||
WHERE name = :name";
|
||||
|
Loading…
x
Reference in New Issue
Block a user