diff --git a/lib/tests/upgradelib_test.php b/lib/tests/upgradelib_test.php index c9c3d0086c03..7678672a28e2 100644 --- a/lib/tests/upgradelib_test.php +++ b/lib/tests/upgradelib_test.php @@ -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.