public function testStart()
 {
     $this->notifier->expects($this->once())->method('notify')->with(NotifierInterface::MESSAGE_UPDATE);
     $task = $this->loadTask();
     $task->setStatus(Task::STATUS_STOPPED);
     self::$DI['app']['orm.em']->persist($task);
     self::$DI['app']['orm.em']->flush();
     $this->sut->start($task);
     $this->assertEquals(Task::STATUS_STARTED, $task->getStatus());
 }
 public function testStart()
 {
     $notifier = $this->createNotifierMock();
     $notifier->expects($this->once())->method('notify')->with(Notifier::MESSAGE_UPDATE);
     $manipulator = new TaskManipulator(self::$DI['app']['EM'], $notifier, self::$DI['app']['translator'], self::$DI['app']['repo.tasks']);
     $task = $this->loadTask();
     $task->setStatus(Task::STATUS_STOPPED);
     self::$DI['app']['EM']->persist($task);
     self::$DI['app']['EM']->flush();
     $manipulator->start($task);
     $this->assertEquals(Task::STATUS_STARTED, $task->getStatus());
 }