예제 #1
0
 /**
  * Remove schedule from db
  *
  * @return void
  */
 public function delete()
 {
     $this->model->removeSchedule($this->schedule);
 }
예제 #2
0
 /**
  * @param Schedule $schedule
  *
  * @return bool
  */
 public function deleteSchedule(Schedule $schedule)
 {
     $this->model->removeSchedule($schedule);
     return true;
 }
예제 #3
0
 /**
  * Test remove schedule
  */
 public function testDeleteSchedule()
 {
     $scheduleDocument = $this->getMockObject('Litvinab\\Bundle\\CronEventBundle\\Document\\Schedule');
     $repository = $this->getMockObject('Litvinab\\Bundle\\CronEventBundle\\Repository\\ScheduleRepository', ['remove']);
     $model = new ScheduleModel($repository);
     $model->deleteSchedule($scheduleDocument);
     $this->assertTrue(true);
 }