public function testShowingATaskThatHasATicketNumber() { $tasksCollection = new ArrayCollection(); $taskTextWithTicket = "#1234# I am going to the doctor."; $tasksCollection->add(new Task($taskTextWithTicket)); $this->mockupOutput->expects($this->once())->method('writeLn')->with("(1234) I am going to the doctor."); $listTasksPresentation = new ListTasks($this->mockupOutput); $listTasksPresentation->render($tasksCollection); }
protected function execute(InputInterface $input, OutputInterface $output) { $tasks = $this->commandHandler->handle(new ListTasksCommand()); $listTasksPresentation = new ListTasksPresentation($output); $listTasksPresentation->render($tasks); }