diff --git a/core/lib/Drupal/Core/Test/JUnitHelper.php b/core/lib/Drupal/Core/Test/JUnitHelper.php index 870d53439b..c0a70b8bb5 100644 --- a/core/lib/Drupal/Core/Test/JUnitHelper.php +++ b/core/lib/Drupal/Core/Test/JUnitHelper.php @@ -157,7 +157,7 @@ protected function testCaseToRow(\SimpleXMLElement $testcase) { $record = [ 'test_id' => $this->testId, 'test_class' => (string) $attributes->class, - 'status' => substr($status, 0, 9), + 'status' => $status, 'message' => $message, // @todo: Check on the proper values for this. 'message_group' => 'Other', diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install index 3ecc6046b5..12b8361265 100644 --- a/core/modules/simpletest/simpletest.install +++ b/core/modules/simpletest/simpletest.install @@ -114,10 +114,10 @@ function simpletest_schema() { ], 'status' => [ 'type' => 'varchar', - 'length' => 9, + 'length' => 12, 'not null' => TRUE, 'default' => '', - 'description' => 'Message status. Core understands pass, fail, exception.', + 'description' => 'Message status.', ], 'message' => [ 'type' => 'text', @@ -198,3 +198,19 @@ function simpletest_uninstall() { } } + +/** + * Increase the size of the 'status' column. + */ +function simpletest_update_8801() { + $schema = \Drupal::database()->schema(); + if ($schema->tableExists('simpletest')) { + $schema->changeField('simpletest', 'status', 'status', [ + 'type' => 'varchar', + 'length' => 12, + 'not null' => TRUE, + 'default' => '', + 'description' => 'Message status.', + ]); + } +} diff --git a/core/modules/simpletest/src/Form/SimpletestResultsForm.php b/core/modules/simpletest/src/Form/SimpletestResultsForm.php index 9434952395..f6ade17cf8 100644 --- a/core/modules/simpletest/src/Form/SimpletestResultsForm.php +++ b/core/modules/simpletest/src/Form/SimpletestResultsForm.php @@ -342,8 +342,8 @@ public static function addResultForm(array &$form, array $results) { // Set summary information. $group_summary['#ok'] = $group_summary['#fail'] + $group_summary['#exception'] == 0; - // Set the group to be revealed if there were fails, errors, or skipped. - $form['result']['results'][$group]['#open'] = !$group_summary['#ok'] || $group_summary['#skipped'] || $group_summary['#risky'] || $group_summary['#incomplete']; + // Set the group to be revealed if there were fails, errors, risky or incomplete. + $form['result']['results'][$group]['#open'] = !$group_summary['#ok'] || $group_summary['#risky'] || $group_summary['#incomplete']; // Store test group (class) as for use in filter. $filter[$group_summary['#ok'] ? 'pass' : 'fail'][] = $group;