public function test_complete_inexistent_step() { $this->setExpectedException('DomainException'); $repository = $this->getRepositoryMock(null); $useCase = new CompleteStep($repository); $command = new CompleteStepCommand(1); $useCase->execute($command); }
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(); }