diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
index 7ea179766f..c653a8b9ad 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@@ -564,7 +564,7 @@ public function testLoad() {
     $this->assertSame('foo', $entity->id());
 
     $this->expectException(\AssertionError::class);
-    $this->expectExceptionMessage('Cannot load a NULL ID.');
+    $this->expectExceptionMessage('Cannot load the "%s" entity with NULL ID.', $this->entityTypeId);
     $this->entityStorage->load(NULL);
   }
 
