示例#1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $tasks = $this->listsTasksHandler->handle();
     $taskDescription = $this->showTasksToDelete($input, $output, $tasks);
     $this->commandHandler->handle(new DeleteTaskCommand($taskDescription));
     $output->writeln('You have just deleted: ' . $taskDescription);
 }
 /**
  * @expectedException \JGimeno\TaskReporter\Domain\Exception\EmptyWorkingDayException
  * @expectedExceptionMessage You have not defined any task for today.
  */
 public function testWhenNoWorkingDayExistsThrowsException()
 {
     $repo = new InMemoryWorkingDayRepository();
     $listTasksHandler = new ListTasksHandler($repo);
     $listTasksHandler->handle(new ListTasks());
 }
示例#3
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $tasks = $this->commandHandler->handle(new ListTasksCommand());
     $listTasksPresentation = new ListTasksPresentation($output);
     $listTasksPresentation->render($tasks);
 }