diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php index 391c9e2b17..67661aa2a2 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php @@ -260,8 +260,7 @@ public function testGetFormObjectInvalidOperation() { $this->setUpEntityTypeDefinitions(['test_entity_type' => $entity]); $entity->getFormClass('default')->willReturn(''); - $this->expectException(InvalidPluginDefinitionException::class, - 'The "test_entity_type" entity type did not specify a "edit" form class and there is not a default class'); + $this->expectException(InvalidPluginDefinitionException::class); $this->entityTypeManager->getFormObject('test_entity_type', 'edit'); }