Fix tests

[MAILPOET-1571]
This commit is contained in:
Pavel Dohnal
2019-01-15 14:43:16 +01:00
parent 1db75f40fb
commit b66c724c4a
8 changed files with 94 additions and 51 deletions

View File

@ -17,7 +17,7 @@ use PHPUnit\Framework\MockObject\MockObject;
class WorkerTest extends \MailPoetTest {
/** @var Scheduler */
/** @var Worker */
private $stats_notifications;
/** @var MockObject */
@ -27,6 +27,9 @@ class WorkerTest extends \MailPoetTest {
private $renderer;
function _before() {
\ORM::raw_execute('TRUNCATE ' . Newsletter::$_table);
\ORM::raw_execute('TRUNCATE ' . ScheduledTask::$_table);
\ORM::raw_execute('TRUNCATE ' . SendingQueue::$_table);
$this->mailer = $this->createMock(Mailer::class);
$this->renderer = $this->createMock(Renderer::class);
$this->stats_notifications = new Worker($this->mailer, $this->renderer);