From dc5e5b4f8b8bf7cdbfa72f862389769f11ef2247 Mon Sep 17 00:00:00 2001
From: Jan Jakes
diff --git a/mailpoet/assets/js/src/automation/editor/components/header/document_actions.tsx b/mailpoet/assets/js/src/automation/editor/components/header/document_actions.tsx
index 854840843d..a833fedaf2 100644
--- a/mailpoet/assets/js/src/automation/editor/components/header/document_actions.tsx
+++ b/mailpoet/assets/js/src/automation/editor/components/header/document_actions.tsx
@@ -68,7 +68,7 @@ export function DocumentActions({ children }): JSX.Element {
as="h1"
>
{__('1 workflow moved to the Trash.', 'mailpoet')}
+{__('1 automation moved to the Trash.', 'mailpoet')}
{__( 'Create customized email sequences with our new automation editor.', diff --git a/mailpoet/assets/js/src/automation/templates/components/template-list-item.tsx b/mailpoet/assets/js/src/automation/templates/components/template-list-item.tsx index 6d1a958314..47b4daa59d 100644 --- a/mailpoet/assets/js/src/automation/templates/components/template-list-item.tsx +++ b/mailpoet/assets/js/src/automation/templates/components/template-list-item.tsx @@ -37,7 +37,7 @@ export function TemplateListItem({
{error.data ? error.data.message - : __('Could not create workflow.', 'mailpoet')} + : __('Could not create automation.', 'mailpoet')}
); diff --git a/mailpoet/lib/AdminPages/Pages/AutomationEditor.php b/mailpoet/lib/AdminPages/Pages/AutomationEditor.php index ce66b226a6..86ec9701d5 100644 --- a/mailpoet/lib/AdminPages/Pages/AutomationEditor.php +++ b/mailpoet/lib/AdminPages/Pages/AutomationEditor.php @@ -64,7 +64,7 @@ class AutomationEditor { if (!$workflow) { $notice = new WPNotice( WPNotice::TYPE_ERROR, - __('Workflow not found.', 'mailpoet') + __('Automation not found.', 'mailpoet') ); $notice->displayWPNotice(); $this->pageRenderer->displayPage('blank.html'); diff --git a/mailpoet/lib/Automation/Engine/Builder/CreateWorkflowFromTemplateController.php b/mailpoet/lib/Automation/Engine/Builder/CreateWorkflowFromTemplateController.php index 4d722d77fc..93293e606d 100644 --- a/mailpoet/lib/Automation/Engine/Builder/CreateWorkflowFromTemplateController.php +++ b/mailpoet/lib/Automation/Engine/Builder/CreateWorkflowFromTemplateController.php @@ -40,7 +40,7 @@ class CreateWorkflowFromTemplateController { $workflowId = $this->storage->createWorkflow($workflow); $savedWorkflow = $this->storage->getWorkflow($workflowId); if (!$savedWorkflow) { - throw new InvalidStateException('Workflow not found.'); + throw new InvalidStateException('Automation not found.'); } return $savedWorkflow; } diff --git a/mailpoet/lib/Automation/Engine/Builder/DuplicateWorkflowController.php b/mailpoet/lib/Automation/Engine/Builder/DuplicateWorkflowController.php index b02a65c897..3dd14571f5 100644 --- a/mailpoet/lib/Automation/Engine/Builder/DuplicateWorkflowController.php +++ b/mailpoet/lib/Automation/Engine/Builder/DuplicateWorkflowController.php @@ -48,7 +48,7 @@ class DuplicateWorkflowController { } private function getName(string $name): string { - // translators: %s is the original workflow name. + // translators: %s is the original automation name. $newName = sprintf(__('Copy of %s', 'mailpoet'), $name); $maxLength = $this->workflowStorage->getNameColumnLength(); if (strlen($newName) > $maxLength) { diff --git a/mailpoet/lib/Automation/Engine/Exceptions.php b/mailpoet/lib/Automation/Engine/Exceptions.php index a312ef0ecd..7478cfb52e 100644 --- a/mailpoet/lib/Automation/Engine/Exceptions.php +++ b/mailpoet/lib/Automation/Engine/Exceptions.php @@ -63,50 +63,50 @@ class Exceptions { public static function workflowNotFound(int $id): NotFoundException { return NotFoundException::create() ->withErrorCode(self::WORKFLOW_NOT_FOUND) - // translators: %d is the ID of the workflow. - ->withMessage(sprintf(__("Workflow with ID '%d' not found.", 'mailpoet'), $id)); + // translators: %d is the ID of the automation. + ->withMessage(sprintf(__("Automation with ID '%d' not found.", 'mailpoet'), $id)); } public static function workflowVersionNotFound(int $workflow, int $version): NotFoundException { return NotFoundException::create() ->withErrorCode(self::WORKFLOW_VERSION_NOT_FOUND) - // translators: %1$s is the ID of the workflow, %2$s the version. - ->withMessage(sprintf(__('Workflow with ID "%1$s" in version "%2$s" not found.', 'mailpoet'), $workflow, $version)); + // translators: %1$s is the ID of the automation, %2$s the version. + ->withMessage(sprintf(__('Automation with ID "%1$s" in version "%2$s" not found.', 'mailpoet'), $workflow, $version)); } public static function workflowNotActive(int $workflow): InvalidStateException { return InvalidStateException::create() ->withErrorCode(self::WORKFLOW_NOT_ACTIVE) - // translators: %1$s is the ID of the workflow. - ->withMessage(sprintf(__('Workflow with ID "%1$s" in no longer active.', 'mailpoet'), $workflow)); + // translators: %1$s is the ID of the automation. + ->withMessage(sprintf(__('Automation with ID "%1$s" in no longer active.', 'mailpoet'), $workflow)); } public static function workflowRunNotFound(int $id): NotFoundException { return NotFoundException::create() ->withErrorCode(self::WORKFLOW_RUN_NOT_FOUND) - // translators: %d is the ID of the workflow run. - ->withMessage(sprintf(__("Workflow run with ID '%d' not found.", 'mailpoet'), $id)); + // translators: %d is the ID of the automation run. + ->withMessage(sprintf(__("Automation run with ID '%d' not found.", 'mailpoet'), $id)); } public static function workflowStepNotFound(string $key): NotFoundException { return NotFoundException::create() ->withErrorCode(self::WORKFLOW_STEP_NOT_FOUND) - // translators: %s is the key of the workflow step. - ->withMessage(sprintf(__("Workflow step with key '%s' not found.", 'mailpoet'), $key)); + // translators: %s is the key of the automation step. + ->withMessage(sprintf(__("Automation step with key '%s' not found.", 'mailpoet'), $key)); } public static function workflowTriggerNotFound(int $workflowId, string $key): NotFoundException { return NotFoundException::create() ->withErrorCode(self::WORKFLOW_TRIGGER_NOT_FOUND) - // translators: %1$s is the key, %2$d is the workflow ID. - ->withMessage(sprintf(__('Workflow trigger with key "%1$s" not found in workflow ID "%2$d".', 'mailpoet'), $key, $workflowId)); + // translators: %1$s is the key, %2$d is the automation ID. + ->withMessage(sprintf(__('Automation trigger with key "%1$s" not found in automation ID "%2$d".', 'mailpoet'), $key, $workflowId)); } public static function workflowRunNotRunning(int $id, string $status): InvalidStateException { return InvalidStateException::create() ->withErrorCode(self::WORKFLOW_RUN_NOT_RUNNING) - // translators: %1$d is the ID of the workflow run, %2$s its current status. - ->withMessage(sprintf(__('Workflow run with ID "%1$d" is not running. Status: %2$s', 'mailpoet'), $id, $status)); + // translators: %1$d is the ID of the automation run, %2$s its current status. + ->withMessage(sprintf(__('Automation run with ID "%1$d" is not running. Status: %2$s', 'mailpoet'), $id, $status)); } public static function subjectNotFound(string $key): NotFoundException { @@ -133,50 +133,50 @@ class Exceptions { public static function subjectDataNotFound(string $key, int $workflowRunId): NotFoundException { return NotFoundException::create() ->withErrorCode(self::SUBJECT_DATA_NOT_FOUND) - // translators: %1$s is the key of the subject, %2$d is workflow run ID. + // translators: %1$s is the key of the subject, %2$d is automation run ID. ->withMessage( - sprintf(__("Subject data for subject with key '%1\$s' not found for workflow run with ID '%2\$d'.", 'mailpoet'), $key, $workflowRunId) + sprintf(__("Subject data for subject with key '%1\$s' not found for automation run with ID '%2\$d'.", 'mailpoet'), $key, $workflowRunId) ); } public static function multipleSubjectsFound(string $key, int $workflowRunId): InvalidStateException { return InvalidStateException::create() ->withErrorCode(self::MULTIPLE_SUBJECTS_FOUND) - // translators: %1$s is the key of the subject, %2$d is workflow run ID. + // translators: %1$s is the key of the subject, %2$d is automation run ID. ->withMessage( - sprintf(__("Multiple subjects with key '%1\$s' found for workflow run with ID '%2\$d', only one expected.", 'mailpoet'), $key, $workflowRunId) + sprintf(__("Multiple subjects with key '%1\$s' found for automation run with ID '%2\$d', only one expected.", 'mailpoet'), $key, $workflowRunId) ); } public static function payloadNotFound(string $class, int $workflowRunId): NotFoundException { return NotFoundException::create() ->withErrorCode(self::PAYLOAD_NOT_FOUND) - // translators: %1$s is the class of the payload, %2$d is workflow run ID. + // translators: %1$s is the class of the payload, %2$d is automation run ID. ->withMessage( - sprintf(__("Payload of class '%1\$s' not found for workflow run with ID '%2\$d'.", 'mailpoet'), $class, $workflowRunId) + sprintf(__("Payload of class '%1\$s' not found for automation run with ID '%2\$d'.", 'mailpoet'), $class, $workflowRunId) ); } public static function multiplePayloadsFound(string $class, int $workflowRunId): NotFoundException { return NotFoundException::create() ->withErrorCode(self::MULTIPLE_PAYLOADS_FOUND) - // translators: %1$s is the class of the payloads, %2$d is workflow run ID. + // translators: %1$s is the class of the payloads, %2$d is automation run ID. ->withMessage( - sprintf(__("Multiple payloads of class '%1\$s' found for workflow run with ID '%2\$d'.", 'mailpoet'), $class, $workflowRunId) + sprintf(__("Multiple payloads of class '%1\$s' found for automation run with ID '%2\$d'.", 'mailpoet'), $class, $workflowRunId) ); } public static function workflowStructureModificationNotSupported(): UnexpectedValueException { return UnexpectedValueException::create() ->withErrorCode(self::WORKFLOW_STRUCTURE_MODIFICATION_NOT_SUPPORTED) - ->withMessage(__("Workflow structure modification not supported.", 'mailpoet')); + ->withMessage(__('Automation structure modification not supported.', 'mailpoet')); } public static function workflowStructureNotValid(string $detail, string $ruleId): UnexpectedValueException { return UnexpectedValueException::create() ->withErrorCode(self::WORKFLOW_STRUCTURE_NOT_VALID) // translators: %s is a detailed information - ->withMessage(sprintf(__("Invalid workflow structure: %s", 'mailpoet'), $detail)) + ->withMessage(sprintf(__("Invalid automation structure: %s", 'mailpoet'), $detail)) ->withErrors(['rule_id' => $ruleId]); } @@ -198,7 +198,7 @@ class Exceptions { return UnexpectedValueException::create() ->withErrorCode(self::WORKFLOW_NOT_VALID) // translators: %s is a detailed information - ->withMessage(sprintf(__("Workflow validation failed: %s", 'mailpoet'), $detail)) + ->withMessage(sprintf(__("Automation validation failed: %s", 'mailpoet'), $detail)) ->withErrors($errors); } @@ -218,14 +218,14 @@ class Exceptions { public static function workflowNotTrashed(int $id): UnexpectedValueException { return UnexpectedValueException::create() ->withErrorCode(self::WORKFLOW_NOT_TRASHED) - // translators: %d is the ID of the workflow. - ->withMessage(sprintf(__("Can't delete workflow with ID '%d' because it was not trashed.", 'mailpoet'), $id)); + // translators: %d is the ID of the automation. + ->withMessage(sprintf(__("Can't delete automation with ID '%d' because it was not trashed.", 'mailpoet'), $id)); } public static function workflowTemplateNotFound(string $id): NotFoundException { return NotFoundException::create() ->withErrorCode(self::WORKFLOW_TEMPLATE_NOT_FOUND) - // translators: %d is the ID of the workflow template. - ->withMessage(sprintf(__("Workflow template with ID '%d' not found.", 'mailpoet'), $id)); + // translators: %d is the ID of the automation template. + ->withMessage(sprintf(__("Automation template with ID '%d' not found.", 'mailpoet'), $id)); } } diff --git a/mailpoet/lib/Automation/Engine/Validation/WorkflowGraph/WorkflowWalker.php b/mailpoet/lib/Automation/Engine/Validation/WorkflowGraph/WorkflowWalker.php index 3bdcb553f5..96ec1b5358 100644 --- a/mailpoet/lib/Automation/Engine/Validation/WorkflowGraph/WorkflowWalker.php +++ b/mailpoet/lib/Automation/Engine/Validation/WorkflowGraph/WorkflowWalker.php @@ -15,7 +15,7 @@ class WorkflowWalker { $steps = $workflow->getSteps(); $root = $steps['root'] ?? null; if (!$root) { - throw Exceptions::workflowStructureNotValid(__("Workflow must contain a 'root' step", 'mailpoet'), 'no-root'); + throw Exceptions::workflowStructureNotValid(__("Automation must contain a 'root' step", 'mailpoet'), 'no-root'); } foreach ($visitors as $visitor) { diff --git a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/AtLeastOneTriggerRule.php b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/AtLeastOneTriggerRule.php index 3d02fbf617..9aba6f21b8 100644 --- a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/AtLeastOneTriggerRule.php +++ b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/AtLeastOneTriggerRule.php @@ -28,6 +28,6 @@ class AtLeastOneTriggerRule implements WorkflowNodeVisitor { if ($this->triggerFound) { return; } - throw Exceptions::workflowStructureNotValid(__('There must be at least one trigger in the workflow.', 'mailpoet'), self::RULE_ID); + throw Exceptions::workflowStructureNotValid(__('There must be at least one trigger in the automation.', 'mailpoet'), self::RULE_ID); } } diff --git a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoCycleRule.php b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoCycleRule.php index a26f9c4ff5..58af60f511 100644 --- a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoCycleRule.php +++ b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoCycleRule.php @@ -27,7 +27,7 @@ class NoCycleRule implements WorkflowNodeVisitor { foreach ($step->getNextSteps() as $nextStep) { $nextStepId = $nextStep->getId(); if ($nextStepId === $step->getId() || isset($parentIdsMap[$nextStepId])) { - throw Exceptions::workflowStructureNotValid(__('Cycle found in workflow graph', 'mailpoet'), self::RULE_ID); + throw Exceptions::workflowStructureNotValid(__('Cycle found in automation graph', 'mailpoet'), self::RULE_ID); } } } diff --git a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoJoinRule.php b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoJoinRule.php index bdba9cd2ca..89ca1804a0 100644 --- a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoJoinRule.php +++ b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoJoinRule.php @@ -24,7 +24,7 @@ class NoJoinRule implements WorkflowNodeVisitor { foreach ($step->getNextSteps() as $nextStep) { $nextStepId = $nextStep->getId(); if (isset($this->visitedSteps[$nextStepId])) { - throw Exceptions::workflowStructureNotValid(__('Path join found in workflow graph', 'mailpoet'), self::RULE_ID); + throw Exceptions::workflowStructureNotValid(__('Path join found in automation graph', 'mailpoet'), self::RULE_ID); } } } diff --git a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoSplitRule.php b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoSplitRule.php index 308757e20c..279cc82cb3 100644 --- a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoSplitRule.php +++ b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoSplitRule.php @@ -16,7 +16,7 @@ class NoSplitRule implements WorkflowNodeVisitor { public function visitNode(Workflow $workflow, WorkflowNode $node): void { $step = $node->getStep(); if (count($step->getNextSteps()) > 1) { - throw Exceptions::workflowStructureNotValid(__('Path split found in workflow graph', 'mailpoet'), self::RULE_ID); + throw Exceptions::workflowStructureNotValid(__('Path split found in automation graph', 'mailpoet'), self::RULE_ID); } } diff --git a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoUnreachableStepsRule.php b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoUnreachableStepsRule.php index 8016502865..2f35a1a3e8 100644 --- a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoUnreachableStepsRule.php +++ b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/NoUnreachableStepsRule.php @@ -23,7 +23,7 @@ class NoUnreachableStepsRule implements WorkflowNodeVisitor { public function complete(Workflow $workflow): void { if (count($this->visitedNodes) !== count($workflow->getSteps())) { - throw Exceptions::workflowStructureNotValid(__('Unreachable steps found in workflow graph', 'mailpoet'), self::RULE_ID); + throw Exceptions::workflowStructureNotValid(__('Unreachable steps found in automation graph', 'mailpoet'), self::RULE_ID); } } } diff --git a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/TriggersUnderRootRule.php b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/TriggersUnderRootRule.php index e3fa66af8a..f4d6264887 100644 --- a/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/TriggersUnderRootRule.php +++ b/mailpoet/lib/Automation/Engine/Validation/WorkflowRules/TriggersUnderRootRule.php @@ -32,7 +32,7 @@ class TriggersUnderRootRule implements WorkflowNodeVisitor { foreach ($step->getNextSteps() as $nextStep) { $nextStepId = $nextStep->getId(); if (isset($this->triggersMap[$nextStepId])) { - throw Exceptions::workflowStructureNotValid(__('Trigger must be a direct descendant of workflow root', 'mailpoet'), self::RULE_ID); + throw Exceptions::workflowStructureNotValid(__('Trigger must be a direct descendant of automation root', 'mailpoet'), self::RULE_ID); } } } diff --git a/mailpoet/tests/integration/Automation/Engine/Control/StepHandlerTest.php b/mailpoet/tests/integration/Automation/Engine/Control/StepHandlerTest.php index c15e3d164f..4a45f03364 100644 --- a/mailpoet/tests/integration/Automation/Engine/Control/StepHandlerTest.php +++ b/mailpoet/tests/integration/Automation/Engine/Control/StepHandlerTest.php @@ -87,7 +87,7 @@ class StepHandlerTest extends \MailPoetTest try { $this->testee->handle(['workflow_run_id' => $workflowRun->getId(), 'step_id' => $currentStep->getId()]); } catch (InvalidStateException $error) { - $this->assertSame('mailpoet_automation_workflow_not_active', $error->getErrorCode(), "Workflow with '$status' did not return expected error code."); + $this->assertSame('mailpoet_automation_workflow_not_active', $error->getErrorCode(), "Automation with '$status' did not return expected error code."); } $this->assertInstanceOf(InvalidStateException::class, $error); diff --git a/mailpoet/tests/integration/Automation/Engine/Storage/WorkflowStorageTest.php b/mailpoet/tests/integration/Automation/Engine/Storage/WorkflowStorageTest.php index bbd38955ee..fcd68c6703 100644 --- a/mailpoet/tests/integration/Automation/Engine/Storage/WorkflowStorageTest.php +++ b/mailpoet/tests/integration/Automation/Engine/Storage/WorkflowStorageTest.php @@ -136,7 +136,7 @@ class WorkflowStorageTest extends \MailPoetTest $workflowId = $this->testee->createWorkflow($workflow); $workflow = $this->testee->getWorkflow($workflowId); if (! $workflow) { - throw new \RuntimeException("Workflow not stored."); + throw new \RuntimeException("Automation not stored."); } return $workflow; } diff --git a/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsDeleteEndpointTest.php b/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsDeleteEndpointTest.php index 619fcbb8d1..21ffe5f476 100644 --- a/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsDeleteEndpointTest.php +++ b/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsDeleteEndpointTest.php @@ -53,7 +53,7 @@ class WorkflowsDeleteEndpointTest extends AutomationTest { $this->assertSame([ 'code' => 'mailpoet_automation_workflow_not_trashed', - 'message' => "Can't delete workflow with ID '{$this->workflow->getId()}' because it was not trashed.", + 'message' => "Can't delete automation with ID '{$this->workflow->getId()}' because it was not trashed.", 'data' => ['status' => 400, 'errors' => []], ], $data); diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowGraph/WorkflowWalkerTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowGraph/WorkflowWalkerTest.php index a2f83225c6..512148763d 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowGraph/WorkflowWalkerTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowGraph/WorkflowWalkerTest.php @@ -13,7 +13,7 @@ class WorkflowWalkerTest extends MailPoetUnitTest { $workflow = $this->createWorkflow([]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage("Invalid workflow structure: Workflow must contain a 'root' step"); + $this->expectExceptionMessage("Invalid automation structure: Automation must contain a 'root' step"); $this->walkWorkflow($workflow); } @@ -21,7 +21,7 @@ class WorkflowWalkerTest extends MailPoetUnitTest { $workflow = $this->createWorkflow(['root' => ['a']]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage("Invalid workflow structure: Step with ID 'a' not found (referenced from 'root')"); + $this->expectExceptionMessage("Invalid automation structure: Step with ID 'a' not found (referenced from 'root')"); $this->walkWorkflow($workflow); } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/AtLeastOnTriggerTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/AtLeastOnTriggerTest.php index 2589d66f4a..cb3d78bb29 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/AtLeastOnTriggerTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/AtLeastOnTriggerTest.php @@ -30,7 +30,7 @@ class AtLeastOnTriggerTest extends WorkflowRuleTest $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: There must be at least one trigger in the workflow.'); + $this->expectExceptionMessage('Invalid automation structure: There must be at least one trigger in the automation.'); (new WorkflowWalker())->walk($workflow, [new AtLeastOneTriggerRule()]); } } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/ConsistentStepMapRuleTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/ConsistentStepMapRuleTest.php index cc156fd7f4..4cc65ae65c 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/ConsistentStepMapRuleTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/ConsistentStepMapRuleTest.php @@ -15,7 +15,7 @@ class ConsistentStepMapRuleTest extends WorkflowRuleTest { ]]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage("Invalid workflow structure: Step with ID 'a' stored under a mismatched index 'root'."); + $this->expectExceptionMessage("Invalid automation structure: Step with ID 'a' stored under a mismatched index 'root'."); (new WorkflowWalker())->walk($workflow, [new ConsistentStepMapRule()]); } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoCycleRuleTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoCycleRuleTest.php index 082c2899e8..12a4cb07b3 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoCycleRuleTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoCycleRuleTest.php @@ -17,7 +17,7 @@ class NoCycleRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Cycle found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Cycle found in automation graph'); (new WorkflowWalker())->walk($workflow, [new NoCycleRule()]); } @@ -27,7 +27,7 @@ class NoCycleRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Cycle found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Cycle found in automation graph'); (new WorkflowWalker())->walk($workflow, [new NoCycleRule()]); } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoDuplicateEdgesTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoDuplicateEdgesTest.php index 40fc44c657..b8f64d649a 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoDuplicateEdgesTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoDuplicateEdgesTest.php @@ -15,7 +15,7 @@ class NoDuplicateEdgesTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Duplicate next step definition found'); + $this->expectExceptionMessage('Invalid automation structure: Duplicate next step definition found'); (new WorkflowWalker())->walk($workflow, [new NoDuplicateEdgesRule()]); } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoJoinRuleTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoJoinRuleTest.php index c5e9658861..107980aa17 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoJoinRuleTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoJoinRuleTest.php @@ -17,7 +17,7 @@ class NoJoinRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Path join found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Path join found in automation graph'); (new WorkflowWalker())->walk($workflow, [new NoJoinRule()]); } @@ -34,7 +34,7 @@ class NoJoinRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Path join found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Path join found in automation graph'); (new WorkflowWalker())->walk($workflow, [new NoJoinRule()]); } @@ -44,7 +44,7 @@ class NoJoinRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Path join found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Path join found in automation graph'); (new WorkflowWalker())->walk($workflow, [new NoJoinRule()]); } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoSplitRuleTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoSplitRuleTest.php index a2abae42f7..a182fd98d3 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoSplitRuleTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoSplitRuleTest.php @@ -16,7 +16,7 @@ class NoSplitRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Path split found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Path split found in automation graph'); (new WorkflowWalker())->walk($workflow, [new NoSplitRule()]); } @@ -27,7 +27,7 @@ class NoSplitRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Path split found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Path split found in automation graph'); (new WorkflowWalker())->walk($workflow, [new NoSplitRule()]); } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoUnreachableStepsRuleTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoUnreachableStepsRuleTest.php index 439573ba51..5880ab427c 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoUnreachableStepsRuleTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/NoUnreachableStepsRuleTest.php @@ -16,7 +16,7 @@ class NoUnreachableStepsRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Unreachable steps found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Unreachable steps found in automation graph'); (new WorkflowWalker())->walk($workflow, [new NoUnreachableStepsRule()]); } @@ -29,7 +29,7 @@ class NoUnreachableStepsRuleTest extends WorkflowRuleTest { ]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Unreachable steps found in workflow graph'); + $this->expectExceptionMessage('Invalid automation structure: Unreachable steps found in automation graph'); $walker = new WorkflowWalker(); (new WorkflowWalker())->walk($workflow, [new NoUnreachableStepsRule()]); } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/TriggerNeedsNextStepsRuleTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/TriggerNeedsNextStepsRuleTest.php index a02fe6aabe..faa859a11a 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/TriggerNeedsNextStepsRuleTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/TriggerNeedsNextStepsRuleTest.php @@ -31,7 +31,7 @@ class TriggerNeedsNextStepsRuleTest extends WorkflowRuleTest $workflow = $this->make(Workflow::class, ['getSteps' => $steps, 'getStep' => function($id) use ($steps) { return $steps[$id]??null; }]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: A trigger needs to be followed by an action.'); + $this->expectExceptionMessage('Invalid automation structure: A trigger needs to be followed by an action.'); (new WorkflowWalker())->walk($workflow, [new TriggerNeedsToBeFollowedByActionRule()]); } @@ -46,7 +46,7 @@ class TriggerNeedsNextStepsRuleTest extends WorkflowRuleTest $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: A trigger needs to be followed by an action.'); + $this->expectExceptionMessage('Invalid automation structure: A trigger needs to be followed by an action.'); (new WorkflowWalker())->walk($workflow, [new TriggerNeedsToBeFollowedByActionRule()]); } } diff --git a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/TriggersUnderRootRuleTest.php b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/TriggersUnderRootRuleTest.php index 467255d018..d26966e378 100644 --- a/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/TriggersUnderRootRuleTest.php +++ b/mailpoet/tests/unit/Automation/Engine/Validation/WorkflowRules/TriggersUnderRootRuleTest.php @@ -18,7 +18,7 @@ class TriggersUnderRootRuleTest extends WorkflowRuleTest { ]]); $this->expectException(UnexpectedValueException::class); - $this->expectExceptionMessage('Invalid workflow structure: Trigger must be a direct descendant of workflow root'); + $this->expectExceptionMessage('Invalid automation structure: Trigger must be a direct descendant of automation root'); (new WorkflowWalker())->walk($workflow, [new TriggersUnderRootRule()]); }