diff --git a/mailpoet/lib/Automation/Engine/Storage/WorkflowStorage.php b/mailpoet/lib/Automation/Engine/Storage/WorkflowStorage.php index 75e817452d..32cb6765d4 100644 --- a/mailpoet/lib/Automation/Engine/Storage/WorkflowStorage.php +++ b/mailpoet/lib/Automation/Engine/Storage/WorkflowStorage.php @@ -131,7 +131,7 @@ class WorkflowStorage { }, (array)$data); } - public function flush(): bool { + public function truncate(): bool { $workflowTable = esc_sql($this->workflowTable); $versionTable = esc_sql($this->versionsTable); return $this->wpdb->query("truncate $workflowTable;") === true && diff --git a/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowPutEndpointTest.php b/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowPutEndpointTest.php index cce2b058f7..8561348ac4 100644 --- a/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowPutEndpointTest.php +++ b/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowPutEndpointTest.php @@ -132,7 +132,7 @@ class WorkflowPutEndpointTest extends AutomationTest } public function _after() { - $this->workflowStorage->flush(); + $this->workflowStorage->truncate(); parent::_after(); } } diff --git a/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsCreateFromTemplateTest.php b/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsCreateFromTemplateTest.php index b713ff8958..5240eed466 100644 --- a/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsCreateFromTemplateTest.php +++ b/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsCreateFromTemplateTest.php @@ -73,7 +73,7 @@ class WorkflowsCreateFromTemplateTest extends AutomationTest { } public function _after() { - $this->workflowStorage->flush(); + $this->workflowStorage->truncate(); parent::_after(); } diff --git a/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsGetTest.php b/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsGetTest.php index 904f87e348..dfee00f139 100644 --- a/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsGetTest.php +++ b/mailpoet/tests/integration/REST/Automation/Workflows/WorkflowsGetTest.php @@ -170,7 +170,7 @@ class WorkflowsGetTest extends AutomationTest { } public function _after() { - $this->workflowStorage->flush(); + $this->workflowStorage->truncate(); foreach ($this->userIds as $userId) { is_multisite() ? wpmu_delete_user($userId) : wp_delete_user($userId); }