Skip to content

Commit bb4208c

Browse files
authored
Merge pull request #21 from php-school/app-help
Update app help
2 parents 43f939b + 6ad6389 commit bb4208c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Application.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ class Application extends PhpDiApp
2525

2626
public function getHelp()
2727
{
28-
return sprintf("<fg=magenta>%s</>\n\n%s", self::$logo, parent::getHelp());
28+
return sprintf(
29+
"<fg=magenta>%s</>\n\n<comment>%s</comment> <info>%s</info>",
30+
self::$logo,
31+
$this->getName(),
32+
$this->getVersion()
33+
);
2934
}
3035
}

test/ApplicationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ApplicationTest extends PHPUnit_Framework_TestCase
1212
{
1313
public function testGetHelp()
1414
{
15-
$application = new Application('PHP School Workshop Manager');
15+
$application = new Application('PHP School Workshop Manager', '1.0.0');
1616

1717
$expected = '<fg=magenta>
1818
____ __ __ ____ ____ __ ___
@@ -23,7 +23,7 @@ public function testGetHelp()
2323
\ \_\ \ \_\ \_\ \_\ \ `\____\ \____\\ \_\ \_\ \____\ \____/\____\
2424
\/_/ \/_/\/_/\/_/ \/_____/\/____/ \/_/\/_/\/___/ \/___/\/____/</>
2525
26-
PHP School Workshop Manager';
26+
<comment>PHP School Workshop Manager</comment> <info>1.0.0</info>';
2727

2828
$this->assertSame($expected, $application->getHelp());
2929
}

0 commit comments

Comments
 (0)