Make static methods in cron workers non-static

[MAILPOET-2538]
This commit is contained in:
Jan Jakeš
2019-11-18 13:16:02 +01:00
committed by Jack Kitterhing
parent ba41f4901e
commit cd93940940
10 changed files with 44 additions and 43 deletions

View File

@@ -18,10 +18,7 @@ class MigrationTest extends \MailPoetTest {
function _before() {
parent::_before();
// Alter table to test migration
if (!Migration::checkUnmigratedColumnsExist()) {
$this->downgradeTable();
$this->altered = true;
}
$this->downgradeTable();
$this->subscriber_to_process = Subscriber::createOrUpdate([
'status' => Subscriber::STATUS_SUBSCRIBED,
@@ -122,7 +119,7 @@ class MigrationTest extends \MailPoetTest {
},
]);
$next_run_date = Migration::getNextRunDate($wp);
$next_run_date = $this->worker->getNextRunDate($wp);
expect($next_run_date->timestamp)->equals($timestamp);
}
@@ -200,9 +197,7 @@ class MigrationTest extends \MailPoetTest {
\ORM::raw_execute('TRUNCATE ' . Subscriber::$_table);
// Restore table after testing
if (!empty($this->altered)) {
$this->restoreTable();
$this->altered = false;
}
$this->restoreTable();
$this->altered = false;
}
}