コード例 #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);
 }
コード例 #2
0
 public function testICanDeleteTaskFromTheWorkingDayFromCommand()
 {
     $workingDay = new WorkingDay(WorkingDayId::generate());
     $workingDay->addTask(new Task("Task test"));
     $this->workingDayRepo->add($workingDay);
     $this->commandHandler->handle(new DeleteTask("Task test"));
     $this->assertCount(0, $workingDay->getTasks());
 }