public function test_archive_non_existent_checklist()
 {
     $this->setExpectedException('DomainException');
     $repository = $this->getRepositoryMock(null);
     $useCase = new ArchiveChecklist($repository);
     $command = new ArchiveChecklistCommand(1);
     $useCase->execute($command);
 }
예제 #2
0
 public function archiveAction($id)
 {
     try {
         $command = new ArchiveChecklistCommand($id);
         $useCase = new ArchiveChecklistUseCase($this->repository);
         $useCase->execute($command);
     } catch (Exception $e) {
         $this->container['session']->getFlashBag()->add('error', $e->getMessage());
     }
     return new Response();
 }