diff --git a/core/modules/system/src/Deprecation/FixtureDeprecatedClass.php b/core/modules/system/src/Deprecation/FixtureDeprecatedClass.php
new file mode 100644
index 0000000000..e5605f4e9e
--- /dev/null
+++ b/core/modules/system/src/Deprecation/FixtureDeprecatedClass.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Drupal\system\Deprecation;
+
+@trigger_error(__NAMESPACE__ . '\FixtureDeprecatedClass is deprecated.', E_USER_DEPRECATED);
+
+/**
+ *
+ */
+class FixtureDeprecatedClass {
+
+  public function testFunction() {
+    return 'test';
+  }
+
+}
diff --git a/core/tests/Drupal/Tests/Core/Listeners/DrupalStandardsListenerDeprecationTest.php b/core/tests/Drupal/Tests/Core/Listeners/DrupalStandardsListenerDeprecationTest.php
new file mode 100644
index 0000000000..9f10c47eda
--- /dev/null
+++ b/core/tests/Drupal/Tests/Core/Listeners/DrupalStandardsListenerDeprecationTest.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Drupal\Tests\Core\Listeners;
+
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * Test deprecation error handling by DrupalStandardsListener.
+ *
+ * DrupalStandardsListener has a dependency on composer/composer, so we can't
+ * test it directly. However, we can create a test which is annotated as
+ * covering a deprecated class. This way we can know whether the standards
+ * listener process handles deprecation errors properly.
+ *
+ * @group Listeners
+ *
+ * @coversDefaultClass \Drupal\system\Deprecation\FixtureDeprecatedClass
+ */
+class DrupalStandardsListenerDeprecationTest extends UnitTestCase {
+
+  /**
+   * @covers ::testFunction
+   */
+  public function testDeprecation() {
+    // Meaningless assertion so this test is not risky.
+    $this->assertTrue(TRUE);
+  }
+
+}
diff --git a/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php b/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php
index fa2541886e..913e46899a 100644
--- a/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php
+++ b/core/tests/Drupal/Tests/Listeners/DrupalStandardsListener.php
@@ -142,6 +142,8 @@ public function checkValidCoversForTest(TestCase $test) {
 
   /**
    * {@inheritdoc}
+   *
+   * @group legacy
    */
   public function endTest(\PHPUnit_Framework_Test $test, $time) {
     // \PHPUnit_Framework_Test does not have any useful methods of its own for
