* Note that the UI strings are not translated because this form is also used
* from run-tests.sh.
*
+ * @internal
+ *
* @see simpletest_script_open_browser()
* @see run-tests.sh
*/
// performed.
$results = [];
if (is_numeric($test_id) && !$results = $this->getResults($test_id)) {
- drupal_set_message($this->t('No test results to display.'), 'error');
+ $this->messenger()->addError($this->t('No test results to display.'));
return new RedirectResponse($this->url('simpletest.test_form', [], ['absolute' => TRUE]));
}
*
* @param array $form
* The form to attach the results to.
- * @param array $test_results
+ * @param array $results
* The simpletest results.
*
* @return array
'Filename',
'Line',
'Function',
- ['colspan' => 2, 'data' => 'Status']
+ ['colspan' => 2, 'data' => 'Status'],
];
$form['result']['results'] = [];
foreach ($test_results as $group => $assertions) {