From: stronk7 Date: Sun, 1 Oct 2006 16:08:25 +0000 (+0000) Subject: Fixed two bugs in the tests... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=38326822290e0c4afe12f7b96f5b0406ff718686;p=moodle.git Fixed two bugs in the tests... --- diff --git a/admin/xmldb/actions/test/test.class.php b/admin/xmldb/actions/test/test.class.php index 7420637829..e24396af2b 100644 --- a/admin/xmldb/actions/test/test.class.php +++ b/admin/xmldb/actions/test/test.class.php @@ -668,10 +668,10 @@ class test extends XMLDBAction { if ($test->status) { /// Get SQL code and execute it $test = new stdClass; - $index = new XMLDBIndex('newnamefortheindex'); + $index = new XMLDBIndex('anyname'); $index->setAttributes(XMLDB_INDEX_UNIQUE, array('name', 'course')); - $test->sql = $table->getRenameIndexSQL($CFG->dbtype, $CFG->prefix, $index, true); + $test->sql = $table->getRenameIndexSQL($CFG->dbtype, $CFG->prefix, $index, 'newnamefortheindex', true); $test->status = rename_index($table, $index, 'newnamefortheindex', false, false); if (!$test->status) { $test->error = $db->ErrorMsg(); @@ -683,10 +683,10 @@ class test extends XMLDBAction { if ($test->status) { /// Get SQL code and execute it $test = new stdClass; - $key = new XMLDBKey('newnameforthekey'); + $key = new XMLDBKey('anyname'); $key->setAttributes(XMLDB_KEY_UNIQUE, array('id', 'course', 'grade')); - $test->sql = $table->getRenameKeySQL($CFG->dbtype, $CFG->prefix, $key, true); + $test->sql = $table->getRenameKeySQL($CFG->dbtype, $CFG->prefix, $key, 'newnameforthekey', true); $test->status = rename_key($table, $key, 'newnameforthekey', false, false); if (!$test->status) { $test->error = $db->ErrorMsg();