mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
MDL-32323 tests: check both deletion with truncate and with delete
This commit is contained in:
parent
5a798e7eac
commit
7823af0994
@ -1626,7 +1626,14 @@ class ddl_test extends UnitTestCase {
|
||||
|
||||
$record = (object)array('id'=>666, 'course'=>10);
|
||||
$DB->import_record('testtable', $record);
|
||||
$DB->delete_records('testtable');
|
||||
$DB->delete_records('testtable'); // This delete performs one TRUNCATE
|
||||
|
||||
$dbman->reset_sequence($table); // using xmldb object
|
||||
$this->assertEqual(1, $DB->insert_record('testtable', (object)array('course'=>13)));
|
||||
|
||||
$record = (object)array('id'=>666, 'course'=>10);
|
||||
$DB->import_record('testtable', $record);
|
||||
$DB->delete_records('testtable', array()); // This delete performs one DELETE
|
||||
|
||||
$dbman->reset_sequence($table); // using xmldb object
|
||||
$this->assertEqual(1, $DB->insert_record('testtable', (object)array('course'=>13)));
|
||||
|
@ -1600,7 +1600,14 @@ class ddl_testcase extends database_driver_testcase {
|
||||
|
||||
$record = (object)array('id'=>666, 'course'=>10);
|
||||
$DB->import_record('testtable', $record);
|
||||
$DB->delete_records('testtable');
|
||||
$DB->delete_records('testtable'); // This delete performs one TRUNCATE
|
||||
|
||||
$dbman->reset_sequence($table); // using xmldb object
|
||||
$this->assertEquals(1, $DB->insert_record('testtable', (object)array('course'=>13)));
|
||||
|
||||
$record = (object)array('id'=>666, 'course'=>10);
|
||||
$DB->import_record('testtable', $record);
|
||||
$DB->delete_records('testtable', array()); // This delete performs one DELETE
|
||||
|
||||
$dbman->reset_sequence($table); // using xmldb object
|
||||
$this->assertEquals(1, $DB->insert_record('testtable', (object)array('course'=>13)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user