Rename WorkflowStorage::flush() to WorkflowStorage::truncate()

[MAILPOET-4531]
This commit is contained in:
David Remer
2022-10-13 12:05:03 +03:00
committed by David Remer
parent dba4b266dd
commit 0679658d33
4 changed files with 4 additions and 4 deletions

View File

@@ -131,7 +131,7 @@ class WorkflowStorage {
}, (array)$data); }, (array)$data);
} }
public function flush(): bool { public function truncate(): bool {
$workflowTable = esc_sql($this->workflowTable); $workflowTable = esc_sql($this->workflowTable);
$versionTable = esc_sql($this->versionsTable); $versionTable = esc_sql($this->versionsTable);
return $this->wpdb->query("truncate $workflowTable;") === true && return $this->wpdb->query("truncate $workflowTable;") === true &&

View File

@@ -132,7 +132,7 @@ class WorkflowPutEndpointTest extends AutomationTest
} }
public function _after() { public function _after() {
$this->workflowStorage->flush(); $this->workflowStorage->truncate();
parent::_after(); parent::_after();
} }
} }

View File

@@ -73,7 +73,7 @@ class WorkflowsCreateFromTemplateTest extends AutomationTest {
} }
public function _after() { public function _after() {
$this->workflowStorage->flush(); $this->workflowStorage->truncate();
parent::_after(); parent::_after();
} }

View File

@@ -170,7 +170,7 @@ class WorkflowsGetTest extends AutomationTest {
} }
public function _after() { public function _after() {
$this->workflowStorage->flush(); $this->workflowStorage->truncate();
foreach ($this->userIds as $userId) { foreach ($this->userIds as $userId) {
is_multisite() ? wpmu_delete_user($userId) : wp_delete_user($userId); is_multisite() ? wpmu_delete_user($userId) : wp_delete_user($userId);
} }