diff --git a/core/modules/system/tests/modules/deprecation_test/deprecation_test.info.yml b/core/modules/system/tests/modules/deprecation_test/deprecation_test.info.yml new file mode 100644 index 000000000000..5b289513caed --- /dev/null +++ b/core/modules/system/tests/modules/deprecation_test/deprecation_test.info.yml @@ -0,0 +1,6 @@ +name: 'Deprecation test' +type: module +description: 'Support module for testing deprecation behaviors.' +package: Testing +version: VERSION +core: 8.x diff --git a/core/modules/system/tests/modules/deprecation_test/src/Deprecation/FixtureDeprecatedClass.php b/core/modules/system/tests/modules/deprecation_test/src/Deprecation/FixtureDeprecatedClass.php new file mode 100644 index 000000000000..65aea782506b --- /dev/null +++ b/core/modules/system/tests/modules/deprecation_test/src/Deprecation/FixtureDeprecatedClass.php @@ -0,0 +1,28 @@ +assertTrue(TRUE); + } + +} diff --git a/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php b/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php index fa2541886ef3..fd15f8218bc1 100644 --- a/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php +++ b/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php @@ -142,6 +142,16 @@ class DrupalStandardsListener extends BaseTestListener { /** * {@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