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)); }
/** * 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); }
/** * @todo Implement testSetActive(). */ public function testSetActive() { $this->assertInstanceOf('Enlight_Components_Cron_Job', $this->job->setActive(false)); $this->assertFalse($this->job->isActive()); }