Exemplo n.º 1
0
 /**
  * Remove event from db
  *
  * @param string $name
  *
  * @return void
  */
 public function deleteEvent($name)
 {
     $this->model->removeEvent($name);
 }
Exemplo n.º 2
0
 /**
  * Test remove event
  */
 public function testRemoveEvent()
 {
     $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->removeEvent('test');
     $this->assertTrue(true);
 }