mult1mate\crontab_tests\TaskMock::createNew PHP Method

createNew() public static method

public static createNew ( ) : mult1mate\crontab\TaskInterface
return mult1mate\crontab\TaskInterface
    public static function createNew()
    {
        return new self();
    }

Usage Example

 public function testCheckAndRunTasks()
 {
     $task_inactive = TaskMock::createNew();
     $task = TaskMock::createNew();
     $task->setStatus(TaskInterface::TASK_STATUS_ACTIVE);
     $task->setTime('* * * * *');
     TaskRunner::checkAndRunTasks(array($task, $task_inactive));
 }
All Usage Examples Of mult1mate\crontab_tests\TaskMock::createNew