File tree Expand file tree Collapse file tree 2 files changed +35
-8
lines changed Expand file tree Collapse file tree 2 files changed +35
-8
lines changed Original file line number Diff line number Diff line change 10
10
11
11
class PhpArkitectApplication extends \Symfony \Component \Console \Application
12
12
{
13
- /** @var string */
14
- private static $ logo = <<< 'EOD'
15
- ____ _ _ ____ _ _ _ _ _
16
- | _ \| | | | _ \ / \ _ __| | _(_) |_ ___ ___| |_
17
- | |_) | |_| | |_) / _ \ | '__| |/ / | __/ _ \/ __| __|
18
- | __/| _ | __/ ___ \| | | <| | || __/ (__| |_
19
- |_| |_| |_|_| /_/ \_\_| |_|\_\_|\__\___|\___|\__|
20
- EOD;
13
+ private static string $ logo = <<< 'EOD'
14
+ ____ _ _ ____ _ _ _ _ _
15
+ | _ \| | | | _ \ / \ _ __| | _(_) |_ ___ ___| |_
16
+ | |_) | |_| | |_) / _ \ | '__| |/ / | __/ _ \/ __| __|
17
+ | __/| _ | __/ ___ \| | | <| | || __/ (__| |_
18
+ |_| |_| |_|_| /_/ \_\_| |_|\_\_|\__\___|\___|\__|
19
+ EOD;
21
20
22
21
public function __construct ()
23
22
{
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Arkitect \Tests \E2E \Cli ;
6
+
7
+ use Arkitect \CLI \PhpArkitectApplication ;
8
+ use PHPUnit \Framework \TestCase ;
9
+ use Symfony \Component \Console \Tester \ApplicationTester ;
10
+
11
+ class VersionCommandTest extends TestCase
12
+ {
13
+ const SUCCESS_CODE = 0 ;
14
+
15
+ const ERROR_CODE = 1 ;
16
+
17
+ public function test_app_returns_version (): void
18
+ {
19
+ $ input = ['--version ' ];
20
+ $ app = new PhpArkitectApplication ();
21
+ $ app ->setAutoExit (false );
22
+
23
+ $ appTester = new ApplicationTester ($ app );
24
+ $ appTester ->run ($ input );
25
+
26
+ self ::assertStringContainsString ('PHPArkitect version ' , $ appTester ->getDisplay ());
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments