From 0679658d3323a52852ee7ca12a84e7f93d6dc356 Mon Sep 17 00:00:00 2001 From: David Remer Date: Thu, 13 Oct 2022 12:05:03 +0300 Subject: [PATCH] Rename WorkflowStorage::flush() to WorkflowStorage::truncate() [MAILPOET-4531] --- mailpoet/lib/Automation/Engine/Storage/WorkflowStorage.php | 2 +- .../REST/Automation/Workflows/WorkflowPutEndpointTest.php | 2 +- .../Automation/Workflows/WorkflowsCreateFromTemplateTest.php | 2 +- .../integration/REST/Automation/Workflows/WorkflowsGetTest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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); }