예제 #1
0
 /**
  * Remove timer from db
  *
  * @param string $name
  *
  * @return void
  */
 public function deleteTimer($name)
 {
     $this->model->removeTimer($name);
 }
예제 #2
0
 /**
  * Test remove timer
  */
 public function testRemoveTimer()
 {
     $scheduleDocument = $this->getMockObject('Litvinab\\Bundle\\CronEventBundle\\Document\\Schedule');
     $repository = $this->getMockObject('Litvinab\\Bundle\\CronEventBundle\\Repository\\ScheduleRepository', ['findOneBy', 'remove']);
     $this->setMockMethodsReturnValue($repository, ['findOneBy'], $scheduleDocument);
     $model = new ScheduleModel($repository);
     $model->removeTimer('test');
     $this->assertTrue(true);
 }