Pass full step map to automation workflow so it can be validated

[MAILPOET-4629]
This commit is contained in:
Jan Jakes
2022-09-23 11:03:38 +02:00
committed by David Remer
parent 1f37be5ef3
commit 02aaba1ded
4 changed files with 12 additions and 15 deletions

View File

@@ -154,7 +154,7 @@ class WorkflowRunLogTest extends \MailPoetTest {
public function testItStoresWorkflowRunAndStepIdsCorrectly() {
$testAction = $this->getRegisteredTestAction();
$actionStep = new Step('action-step-id', Step::TYPE_ACTION, $testAction->getKey(), [], []);
$workflow = new Workflow('test_workflow', [$actionStep], new \WP_User());
$workflow = new Workflow('test_workflow', [$actionStep->getId() => $actionStep], new \WP_User());
$workflowId = $this->workflowStorage->createWorkflow($workflow);
// Reload to get additional data post-save
$workflow = $this->workflowStorage->getWorkflow($workflowId);
@@ -240,7 +240,7 @@ class WorkflowRunLogTest extends \MailPoetTest {
}
$testAction = $this->getRegisteredTestAction($callback);
$actionStep = new Step('action-step-id', Step::TYPE_ACTION, $testAction->getKey(), [], []);
$workflow = new Workflow('test_workflow', [$actionStep], new \WP_User());
$workflow = new Workflow('test_workflow', [$actionStep->getId() => $actionStep], new \WP_User());
$workflowId = $this->workflowStorage->createWorkflow($workflow);
// Reload to get additional data post-save
$workflow = $this->workflowStorage->getWorkflow($workflowId);