File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public function setApplication(Application $application): Kernel
63
63
public function commands (array $ commands ): void
64
64
{
65
65
foreach ($ commands as $ command ) {
66
- $ this ->application ->add (new $ command );
66
+ $ this ->application ->add (new $ command() );
67
67
}
68
68
}
69
69
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace Test ;
5
+ namespace Tests ;
6
6
7
7
use Lion \Command \Command ;
8
8
use Lion \Test \Test ;
9
9
10
10
class CommandTest extends Test
11
11
{
12
- const TEST = 'Test ' ;
13
- const ERROR_OUTPUT = "\033[0;31mTest \033[0m " ;
14
- const SUCCESS_OUTPUT = "\033[0;32mTest \033[0m " ;
15
- const WARNING_OUTPUT = "\033[0;33mTest \033[0m " ;
16
- const INFO_OUTPUT = "\033[0;36mTest \033[0m " ;
17
- const PURPLE_OUTPUT = "\033[0;95mTest \033[0m " ;
12
+ private const string TEST = 'Test ' ;
13
+ private const string ERROR_OUTPUT = "\033[0;31mTest \033[0m " ;
14
+ private const string SUCCESS_OUTPUT = "\033[0;32mTest \033[0m " ;
15
+ private const string WARNING_OUTPUT = "\033[0;33mTest \033[0m " ;
16
+ private const string INFO_OUTPUT = "\033[0;36mTest \033[0m " ;
17
+ private const string PURPLE_OUTPUT = "\033[0;95mTest \033[0m " ;
18
18
19
19
private $ customCommand ;
20
20
21
21
public function setUp (): void
22
22
{
23
- $ this ->customCommand = new class extends Command {};
23
+ $ this ->customCommand = new class extends Command {
24
+ };
24
25
}
25
26
26
27
public function testErrorOutput (): void
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace Test ;
5
+ namespace Tests ;
6
6
7
7
use Lion \Command \Command ;
8
8
use Lion \Command \Kernel ;
13
13
14
14
class KernelTest extends Test
15
15
{
16
- const OUTPUT = ['Example command ' ];
16
+ private const array OUTPUT = [
17
+ 'Example command ' ,
18
+ ];
17
19
18
20
private Kernel $ kernel ;
19
- private object $ customClass ;
21
+ private Command $ customClass ;
20
22
21
23
public function setUp (): void
22
24
{
You can’t perform that action at this time.
0 commit comments