Skip to content

Commit

Permalink
fixup! MDL-83153 core: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 18, 2024
1 parent d1bcfa4 commit b387b5d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/tests/upgradelib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1724,12 +1724,14 @@ public function test_upgrade_change_binary_column_to_int(
$field = $columns[$fieldname];
$this->assertFalse($field->binary);

// Confirm that the values for the converted column ar ethe same.
$records = $DB->get_fieldset($tmptablename, 'id', [$fieldname => 1]);
$this->assertEqualsCanonicalizing($ones, $records);

// Verify that the renamed old field has now been removed.
$this->assertArrayNotHasKey("tmp$fieldname", $columns);

// Confirm that the values for the converted column are the same.
// \moodle_database::get_fieldset() would have been great, but it does not seem to play well with Oracle.
$records = $DB->get_records($tmptablename, [$fieldname => 1], '', 'id');
$ids = array_keys($records);
$this->assertEqualsCanonicalizing($ones, $ids);
}

// Cleanup.
Expand Down

0 comments on commit b387b5d

Please sign in to comment.