public function testGetLongVersion() { $application =
new Application('foo', 'bar'
);
$this->
assertEquals('foo <info>bar</info>',
$application->
getLongVersion(), '->getLongVersion() returns the long version of the application'
);
} public function testHelp() { $application =
new Application();
$this->
assertStringEqualsFile(self::
$fixturesPath.'/application_gethelp.txt',
$this->
normalizeLineBreaks($application->
getHelp()), '->getHelp() returns a help message'
);
} public function testAll() { $application =
new Application();
$commands =
$application->
all();
$this->
assertInstanceOf(HelpCommand::
class,
$commands['help'
], '->all() returns the registered commands'
);
$application->
add(new \
FooCommand());
$commands =
$application->
all('foo'
);
$this->
assertCount(1,
$commands, '->all() takes a namespace as its first argument'
);
}