diff --git a/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php b/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php index 913e46899a..fd15f8218b 100644 --- a/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php +++ b/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php @@ -143,7 +143,15 @@ public function checkValidCoversForTest(TestCase $test) { /** * {@inheritdoc} * + * We must mark this method as belonging to the special legacy group because + * it might trigger an E_USER_DEPRECATED error during coverage annotation + * validation. The legacy group allows symfony/phpunit-bridge to keep the + * deprecation notice as a warning instead of an error, which would fail the + * test. + * * @group legacy + * + * @see http://symfony.com/doc/current/components/phpunit_bridge.html#mark-tests-as-legacy */ public function endTest(\PHPUnit_Framework_Test $test, $time) { // \PHPUnit_Framework_Test does not have any useful methods of its own for