diff --git a/core/modules/system/src/Tests/System/ErrorHandlerTest.php b/core/modules/system/src/Tests/System/ErrorHandlerTest.php
index 8164f36..c65a67e 100644
--- a/core/modules/system/src/Tests/System/ErrorHandlerTest.php
+++ b/core/modules/system/src/Tests/System/ErrorHandlerTest.php
@@ -111,6 +111,7 @@ function testErrorHandler() {
     $this->assertNoErrorMessage($error_notice);
     $this->assertNoErrorMessage($error_warning);
     $this->assertNoErrorMessage($error_user_notice);
+    $this->assertNoRaw('class="messages messages--"', 'Did not find the messages block');
     $this->assertNoRaw('<pre class="backtrace">', 'Did not find pre element with backtrace class.');
   }
 
