public function testExecuteFunction()
{
$this->expectOutputString("[31mhello foobar![0m\n");
$this->console->addCommand(function ($args, $opts, $console) {
$console->writeln(Colors::colorize(sprintf("hello %s!", $args[0]), $opts['color']));
}, 'test');
$this->console->addCommand('test2', function ($args, $opts, $console) {
return "success";
});
$this->console->execute('test', array('foobar'), array('color' => 'red'));
$this->assertEquals("success", $this->console->execute('test2'));
}