Author: mult1mate Date: 01.02.16 Time: 10:07
Inheritance: implements mult1mate\crontab\TaskInterface
Esempio n. 1
0
 public function testCheckAndRunTasks()
 {
     $task_inactive = TaskMock::createNew();
     $task = TaskMock::createNew();
     $task->setStatus(TaskInterface::TASK_STATUS_ACTIVE);
     $task->setTime('* * * * *');
     TaskRunner::checkAndRunTasks(array($task, $task_inactive));
 }
Esempio n. 2
0
 public function testGetTaskCrontabLine()
 {
     $task = TaskMock::createNew();
     $task->setStatus(TaskInterface::TASK_STATUS_INACTIVE);
     $task->setCommand('Class::method()');
     $task->setComment('comment');
     $task->setTime('* * * * *');
     $export = TaskManager::getTaskCrontabLine($task, 'path', 'php', 'index.php');
     $this->assertEquals("#comment\n#* * * * * cd path; php index.php Class method  2>&1 > /dev/null\n", $export);
 }