Skip to content
Snippets Groups Projects

Resolve #3019582 "Data save col long"

Open Pooja Sharma requested to merge issue/drupal-3019582:3019582-data-save-col-long into 11.x
6 unresolved threads
Files
2
@@ -2,6 +2,8 @@
namespace Drupal\Core\Test;
use Drupal\Component\Utility\Unicode;
/**
* Converts JUnit XML to Drupal's {simpletest} schema.
*
@@ -122,6 +124,8 @@ public static function convertTestCaseToSimpletestRow($test_id, \SimpleXMLElemen
}
$attributes = $test_case->attributes();
$function_name = Unicode::convertToUtf8($attributes->class . '->' . $attributes->name . '()', 'UTF-8');
$function_name = mb_strlen($function_name) > 255 ? mb_substr($function_name, 0, 255) : $function_name;
    • I think this should probably trim the string from the end rather than the beginning (probably need to calculate the offset based on the length) - all our tests start with \Drupal, it's the end that's unique and useful to know.

Please register or sign in to reply
$record = [
'test_id' => $test_id,
@@ -129,7 +133,7 @@ public static function convertTestCaseToSimpletestRow($test_id, \SimpleXMLElemen
'status' => $pass ? 'pass' : 'fail',
'message' => $message,
'message_group' => 'Other',
'function' => $attributes->class . '->' . $attributes->name . '()',
'function' => $function_name,
'line' => (int) $attributes->line ?: 0,
'file' => (string) $attributes->file,
];
Loading