add(new module_console_tasklist('task:list')); $command = $application->find('task:list'); $commandTester = new CommandTester($command); $commandTester->execute(array('command' => $command->getName())); $task_manager = new task_manager(appbox::get_instance(\bootstrap::getCore())); $lines = explode("\n", trim($commandTester->getDisplay())); if(count($task_manager->get_tasks()) > 0) { $this->assertEquals(count($task_manager->get_tasks()), count($lines)); foreach($task_manager->get_tasks() as $task) { $this->assertTrue(strpos($commandTester->getDisplay(), $task->get_title()) !== false); } } else { $this->assertEquals(1, $n_lines); } } } ?>