public function testGetAllCronJobsIgnoreActive()
 {
     $this->assertArrayCount(0, $this->object->getAllJobs());
     $this->assertInstanceOf('Enlight_Components_Cron_Adapter', $this->object->addJob($this->job));
     $this->job->setAction('foo');
     $this->job->setActive(false);
     $this->assertInstanceOf('Enlight_Components_Cron_Adapter', $this->object->addJob($this->job));
     $this->assertArrayCount(1, $this->object->getAllJobs());
     $this->assertArrayCount(2, $this->object->getAllJobs(true));
 }
Exemple #2
0
 /**
  * Deactivate a given Cron Job in the crontab
  *
  * @param Enlight_Components_Cron_Job $job
  * @return Enlight_Components_Cron_Adapter
  */
 public function disableJob(Enlight_Components_Cron_Job $job)
 {
     $job->setActive(false);
     return $this->adapter->updateJob($job);
 }
Exemple #3
0
 /**
  * @todo Implement testSetActive().
  */
 public function testSetActive()
 {
     $this->assertInstanceOf('Enlight_Components_Cron_Job', $this->job->setActive(false));
     $this->assertFalse($this->job->isActive());
 }