Ejemplo n.º 1
0
 public function test_complete_inexistent_step()
 {
     $this->setExpectedException('DomainException');
     $repository = $this->getRepositoryMock(null);
     $useCase = new CompleteStep($repository);
     $command = new CompleteStepCommand(1);
     $useCase->execute($command);
 }
Ejemplo n.º 2
0
 public function completeAction($id)
 {
     try {
         $command = new CompleteStepCommand($id);
         $useCase = new CompleteStepUseCase($this->repository);
         $useCase->execute($command);
     } catch (Exception $e) {
         $this->container['session']->getFlashBag()->add('error', $e->getMessage());
     }
     return new Response();
 }