MDL-23568 new unit test that verifies the id is not modified in isnert_record() methods

This commit is contained in:
Petr Skoda
2010-07-31 21:13:46 +00:00
parent 1045bec09c
commit e9fec42f01
+9
View File
@@ -1342,6 +1342,15 @@ class dml_test extends UnitTestCase {
$this->assertEqual($newclob, $record->onetext, 'Test "small" CLOB insert (full contents output disabled)');
$this->assertEqual($newblob, $record->onebinary, 'Test "small" BLOB insert (full contents output disabled)');
$this->assertEqual(false, $rs->key()); // Ensure recordset key() method to be working ok after closing
// test data is not modified
$rec = new object();
$rec->id = -1; // has to be ignored
$rec->course = 3;
$rec->lalala = 'lalal'; // unused
$before = clone($rec);
$DB->insert_record($tablename, $record);
$this->assertEqual($rec, $before);
}
public function test_import_record() {