Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
assertTableColumn() in uuid.test causes assertion to fail incorrectly as $record->field property does not exist. When running the tests the property is $record->Field (capital F). I don't know if this is different in different versions of mysql/php/drupal/pdo/etc, so safest would be to check both properties i.e.
function assertTableColumn($table, $column, $message) {
$result = db_query("SHOW COLUMNS FROM {$table}");
$exists = FALSE;
foreach ($result as $record) {
$field_property = isset($record->Field) ? "Field" : "field";
if ($record->$field_property == $column) {
$exists = TRUE;
break;
}
}
$this->assertTrue($exists, $message);
}
Comment | File | Size | Author |
---|---|---|---|
#1 | uuid-fix-assertTableColumn-2199617.patch | 484 bytes | andyrigby |
Comments
Comment #1
andyrigby CreditAttribution: andyrigby commentedComment #2
andyrigby CreditAttribution: andyrigby commented