Skip to content

Commit

Permalink
Fixed two bugs in the tests...
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Oct 1, 2006
1 parent 51517dd commit 3832682
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions admin/xmldb/actions/test/test.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,10 @@ function invoke() {
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();
Expand All @@ -683,10 +683,10 @@ function invoke() {
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();
Expand Down

0 comments on commit 3832682

Please sign in to comment.