Loading core/modules/workspaces/src/EntityOperations.php +1 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ public function entityPresave(EntityInterface $entity) { // Disallow any change to an unsupported entity when we are not in the // default workspace. if (!$this->workspaceInfo->isEntitySupported($entity)) { throw new \RuntimeException('This entity can only be saved in the default workspace.'); throw new \RuntimeException(sprintf('The "%s" entity type can only be saved in the default workspace.', $entity->getEntityTypeId())); } /** @var \Drupal\Core\Entity\ContentEntityInterface|\Drupal\Core\Entity\EntityPublishedInterface $entity */ Loading core/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ public function testUnsupportedEntityTypes(): void { // Check that unsupported entity types can not be saved in a workspace. $this->expectException(EntityStorageException::class); $this->expectExceptionMessage('This entity can only be saved in the default workspace.'); $this->expectExceptionMessage('The "entity_test" entity type can only be saved in the default workspace.'); $entity->save(); } Loading core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -690,7 +690,7 @@ public function testDisallowedEntityCreateInNonDefaultWorkspace($entity_type_id, if (!$allowed) { $this->expectException(EntityStorageException::class); $this->expectExceptionMessage('This entity can only be saved in the default workspace.'); $this->expectExceptionMessage("The \"$entity_type_id\" entity type can only be saved in the default workspace."); } $entity->save(); } Loading Loading @@ -721,7 +721,7 @@ public function testDisallowedEntityUpdateInNonDefaultWorkspace($entity_type_id, if (!$allowed) { $this->expectException(EntityStorageException::class); $this->expectExceptionMessage('This entity can only be saved in the default workspace.'); $this->expectExceptionMessage("The \"$entity_type_id\" entity type can only be saved in the default workspace."); } $entity->save(); } Loading Loading
core/modules/workspaces/src/EntityOperations.php +1 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ public function entityPresave(EntityInterface $entity) { // Disallow any change to an unsupported entity when we are not in the // default workspace. if (!$this->workspaceInfo->isEntitySupported($entity)) { throw new \RuntimeException('This entity can only be saved in the default workspace.'); throw new \RuntimeException(sprintf('The "%s" entity type can only be saved in the default workspace.', $entity->getEntityTypeId())); } /** @var \Drupal\Core\Entity\ContentEntityInterface|\Drupal\Core\Entity\EntityPublishedInterface $entity */ Loading
core/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ public function testUnsupportedEntityTypes(): void { // Check that unsupported entity types can not be saved in a workspace. $this->expectException(EntityStorageException::class); $this->expectExceptionMessage('This entity can only be saved in the default workspace.'); $this->expectExceptionMessage('The "entity_test" entity type can only be saved in the default workspace.'); $entity->save(); } Loading
core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -690,7 +690,7 @@ public function testDisallowedEntityCreateInNonDefaultWorkspace($entity_type_id, if (!$allowed) { $this->expectException(EntityStorageException::class); $this->expectExceptionMessage('This entity can only be saved in the default workspace.'); $this->expectExceptionMessage("The \"$entity_type_id\" entity type can only be saved in the default workspace."); } $entity->save(); } Loading Loading @@ -721,7 +721,7 @@ public function testDisallowedEntityUpdateInNonDefaultWorkspace($entity_type_id, if (!$allowed) { $this->expectException(EntityStorageException::class); $this->expectExceptionMessage('This entity can only be saved in the default workspace.'); $this->expectExceptionMessage("The \"$entity_type_id\" entity type can only be saved in the default workspace."); } $entity->save(); } Loading