Add tests

This commit is contained in:
Amine Ben hammou
2019-02-26 13:56:28 +01:00
committed by M. Shull
parent b5bc6ec3c6
commit 658f4a6eb1
2 changed files with 13 additions and 8 deletions

View File

@@ -116,14 +116,6 @@ class SimpleWorkerTest extends \MailPoetTest {
expect(count(MockSimpleWorker::getDueTasks()))->equals(2);
}
function testItCanGetFutureTasks() {
expect(MockSimpleWorker::getFutureTasks())->isEmpty();
$task = $this->createScheduledTask();
$task->scheduled_at = Carbon::createFromTimestamp(current_time('timestamp'))->addDays(7);
$task->save();
expect(count(MockSimpleWorker::getFutureTasks()))->notEmpty();
}
function testItFailsToProcessWithoutTasks() {
expect($this->worker->process())->false();
}