diff --git a/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php b/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php index a368894416..ab8e5802bb 100644 --- a/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php +++ b/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php @@ -79,8 +79,10 @@ public function onConfigImporterValidate(ConfigImporterEvent $event) { * Get the workflow entity object from the configuration name. * * @param string $config_name + * The configuration object name. * * @return \Drupal\Core\Entity\EntityInterface|null + * An entity object. NULL if no matching entity is found. */ protected function getWorkflow($config_name) { $entity_type_id = $this->configManager->getEntityTypeIdByName($config_name); diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php index 15bc5fb284..0680bf1f26 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationWorkflowConfigTest.php @@ -128,7 +128,7 @@ public function testDeletingStateViaConfiguration() { \Drupal::service('config.storage.sync')->delete('workflows.workflow.editorial'); - + // An error should be thrown when trying to delete an in use workflow. try { $this->configImporter()->reset()->import(); $this->fail('ConfigImporterException not thrown, invalid import was not stopped due to deleted workflow.');