diff --git a/core/modules/simpletest/simpletest.api.php b/core/modules/simpletest/simpletest.api.php index f911701cb4..45c6da6fdb 100644 --- a/core/modules/simpletest/simpletest.api.php +++ b/core/modules/simpletest/simpletest.api.php @@ -30,14 +30,11 @@ function hook_simpletest_alter(&$groups) { * * This hook is called just once at the beginning of a test group. * - * This hook is only invoked by the Simpletest UI builder. It will not be + * This hook is only invoked by the Simpletest UI form runner. It will not be * invoked by run-tests.sh or the phpunit tool. * - * @deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.0. Convert + * @deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. Convert * your test to a PHPUnit-based one and implement test listeners. - * - * @todo Modify all invocations of this hook to throw a deprecation error after - * https://www.drupal.org/node/2866779 */ function hook_test_group_started() { } @@ -47,14 +44,11 @@ function hook_test_group_started() { * * This hook is called just once at the end of a test group. * - * This hook is only invoked by the Simpletest UI builder. It will not be + * This hook is only invoked by the Simpletest UI form runner. It will not be * invoked by run-tests.sh or the phpunit tool. * - * @deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.0. Convert + * @deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. Convert * your test to a PHPUnit-based one and implement test listeners. - * - * @todo Modify all invocations of this hook to throw a deprecation error after - * https://www.drupal.org/node/2866779 */ function hook_test_group_finished() { } @@ -64,7 +58,7 @@ function hook_test_group_finished() { * * This hook is called when an individual test has finished. * - * This hook is only invoked by the Simpletest UI builder. It will not be + * This hook is only invoked by the Simpletest UI form runner. It will not be * invoked by run-tests.sh or the phpunit tool. * * @param @@ -73,11 +67,8 @@ function hook_test_group_finished() { * * @see \Drupal\simpletest\WebTestBase::results() * - * @deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.0. Convert + * @deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. Convert * your test to a PHPUnit-based one and implement test listeners. - * - * @todo Modify all invocations of this hook to throw a deprecation error after - * https://www.drupal.org/node/2866779 */ function hook_test_finished($results) { } diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 0e0ea2afd4..9f4a1ad4cd 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -161,7 +161,7 @@ function simpletest_run_tests($test_list) { ]; batch_set($batch); - \Drupal::moduleHandler()->invokeAll('test_group_started'); + \Drupal::moduleHandler()->invokeAllDeprecated('Convert your test to a PHPUnit-based one and implement test listeners.', 'test_group_started'); return $test_id; } @@ -428,7 +428,7 @@ function _simpletest_batch_operation($test_list_init, $test_id, &$context) { else { $test = new $test_class($test_id); $test->run(); - \Drupal::moduleHandler()->invokeAll('test_finished', [$test->results]); + \Drupal::moduleHandler()->invokeAllDeprecated('Convert your test to a PHPUnit-based one and implement test listeners.', 'test_finished', [$test->results]); $test_results[$test_class] = $test->results; } $size = count($test_list); @@ -490,7 +490,7 @@ function _simpletest_batch_finished($success, $results, $operations, $elapsed) { drupal_set_message(t('The test run did not successfully finish.'), 'error'); drupal_set_message(t('Use the Clean environment button to clean-up temporary files and tables.'), 'warning'); } - \Drupal::moduleHandler()->invokeAll('test_group_finished'); + \Drupal::moduleHandler()->invokeAllDeprecated('Convert your test to a PHPUnit-based one and implement test listeners.', 'test_group_finished'); } /**