/** * Remove timer from db * * @param string $name * * @return void */ public function deleteTimer($name) { $this->model->removeTimer($name); }
/** * 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); }