diff --git a/core/tests/Drupal/Tests/Standards/DrupalStandardsListener.php b/core/tests/Drupal/Tests/Standards/DrupalStandardsListener.php
index 713c2ae..2d0e8b6 100644
--- a/core/tests/Drupal/Tests/Standards/DrupalStandardsListener.php
+++ b/core/tests/Drupal/Tests/Standards/DrupalStandardsListener.php
@@ -55,7 +55,7 @@ protected function classExists($class) {
    */
   public function checkValidCoversForTest(\PHPUnit_Framework_TestCase $test) {
     // If we're generating a coverage report already, don't do anything here.
-    if ($test->getTestResultObject()->getCollectCodeCoverageInformation()) {
+    if ($test->getTestResultObject() && $test->getTestResultObject()->getCollectCodeCoverageInformation()) {
       return;
     }
     // Gather our annotations.
