Make static methods in cron workers non-static
[MAILPOET-2538]
This commit is contained in:
committed by
Jack Kitterhing
parent
ba41f4901e
commit
cd93940940
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user