function test_remove_job() { $crontab = new Crontab($this->config); $time = '0 * * * *'; $action = 'test_add_job'; $crontab->add_job($time, $action); $file_items = explode("\n", read_file($crontab->cronfile)); $job = $time . ' ' . $crontab->php_path . ' ' . $crontab->cli_path . $action; $this->assertTrue(in_array($job, $file_items)); //actual test $crontab->remove_job($time, $action); $file_items = explode("\n", read_file($crontab->cronfile)); $job = $time . ' ' . $crontab->php_path . ' ' . $crontab->cli_path . $action; $this->assertFalse(in_array($job, $file_items)); }