diff --git a/mailpoet/lib/Automation/Engine/Data/AutomationRunLog.php b/mailpoet/lib/Automation/Engine/Data/AutomationRunLog.php index 5886730ebf..bc9402e3b8 100644 --- a/mailpoet/lib/Automation/Engine/Data/AutomationRunLog.php +++ b/mailpoet/lib/Automation/Engine/Data/AutomationRunLog.php @@ -8,10 +8,9 @@ use MailPoet\Automation\Engine\Utils\Json; use Throwable; class AutomationRunLog { - - const STATUS_RUNNING = 'running'; - const STATUS_COMPLETED = 'completed'; - const STATUS_FAILED = 'failed'; + public const STATUS_RUNNING = 'running'; + public const STATUS_COMPLETE = 'complete'; + public const STATUS_FAILED = 'failed'; /** @var int */ private $id; @@ -113,7 +112,7 @@ class AutomationRunLog { } public function markCompletedSuccessfully(): void { - $this->status = self::STATUS_COMPLETED; + $this->status = self::STATUS_COMPLETE; $this->completedAt = new DateTimeImmutable(); } diff --git a/mailpoet/lib/Automation/Integrations/MailPoet/Analytics/Controller/StepStatisticController.php b/mailpoet/lib/Automation/Integrations/MailPoet/Analytics/Controller/StepStatisticController.php index 9d1a8c953e..610efb974f 100644 --- a/mailpoet/lib/Automation/Integrations/MailPoet/Analytics/Controller/StepStatisticController.php +++ b/mailpoet/lib/Automation/Integrations/MailPoet/Analytics/Controller/StepStatisticController.php @@ -67,7 +67,7 @@ class StepStatisticController { public function getFlowStatistics(Automation $automation, Query $query): array { $statistics = $this->automationRunLogStorage->getAutomationRunStatisticsForAutomationInTimeFrame( $automation->getId(), - AutomationRunLog::STATUS_COMPLETED, + AutomationRunLog::STATUS_COMPLETE, $query->getAfter(), $query->getBefore() ); diff --git a/mailpoet/tests/integration/Automation/Engine/Data/AutomationRunLogTest.php b/mailpoet/tests/integration/Automation/Engine/Data/AutomationRunLogTest.php index 3702679fd2..30fda20740 100644 --- a/mailpoet/tests/integration/Automation/Engine/Data/AutomationRunLogTest.php +++ b/mailpoet/tests/integration/Automation/Engine/Data/AutomationRunLogTest.php @@ -147,7 +147,7 @@ class AutomationRunLogTest extends \MailPoetTest { $automationRunLogs = $this->getLogsForAction(); expect($automationRunLogs)->count(1); $log = $automationRunLogs[0]; - expect($log->getStatus())->equals(AutomationRunLog::STATUS_COMPLETED); + expect($log->getStatus())->equals(AutomationRunLog::STATUS_COMPLETE); } public function testItStoresAutomationRunAndStepIdsCorrectly() { diff --git a/mailpoet/tests/integration/Automation/Engine/Storage/AutomationRunLogStorageTest.php b/mailpoet/tests/integration/Automation/Engine/Storage/AutomationRunLogStorageTest.php index ea28ab996e..9baa05f826 100644 --- a/mailpoet/tests/integration/Automation/Engine/Storage/AutomationRunLogStorageTest.php +++ b/mailpoet/tests/integration/Automation/Engine/Storage/AutomationRunLogStorageTest.php @@ -64,7 +64,7 @@ class AutomationRunLogStorageTest extends \MailPoetTest { 'after' => new \DateTimeImmutable('2020-01-01 00:00:00'), 'before' => new \DateTimeImmutable('2020-01-02 00:00:00'), ]; - $status = AutomationRunLog::STATUS_COMPLETED; + $status = AutomationRunLog::STATUS_COMPLETE; $automationId = 1; $this->storage->truncate();