Remove redundant methods from email editor IntegrationTester
[MAILPOET-6216]
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,8 +40,6 @@ class IntegrationTester extends \Codeception\Actor
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function cleanup() {
|
public function cleanup() {
|
||||||
$this->deleteWordPressTerms();
|
|
||||||
$this->deleteCreatedComments();
|
|
||||||
$this->deletePosts();
|
$this->deletePosts();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,20 +48,4 @@ class IntegrationTester extends \Codeception\Actor
|
|||||||
wp_delete_post($post->ID, true);
|
wp_delete_post($post->ID, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function deleteWordPressTerms(): void {
|
|
||||||
foreach ($this->wpTermIds as $taxonomy => $termIds) {
|
|
||||||
foreach ($termIds as $termId) {
|
|
||||||
wp_delete_term($termId, $taxonomy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->wpTermIds = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
private function deleteCreatedComments() {
|
|
||||||
foreach ($this->createdCommentIds as $commentId) {
|
|
||||||
wp_delete_comment($commentId, true);
|
|
||||||
}
|
|
||||||
$this->createdCommentIds = [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user