Skip to content

Commit 50e4093

Browse files
committed
ITT: Tests improved.
1 parent 9c033e7 commit 50e4093

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

tests/Helpers/InteractsWithConsoleTest.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@
33
class InteractsWithConsoleTest extends TestCase
44
{
55
/** @test */
6-
public function it_can_run_console_command_by_class_name_and_optional_parameters()
6+
public function it_can_run_console_command_by_class_name()
7+
{
8+
$command = $this->runConsoleCommand(GenericCommand::class);
9+
10+
$this->assertInstanceOf(GenericCommand::class, $command);
11+
$this->assertEquals('Hello, Dude!', $command->getGreetingMessage());
12+
}
13+
14+
/** @test */
15+
public function it_can_run_console_command_by_class_name_and_parameters()
716
{
817
$command = $this->runConsoleCommand(GenericCommand::class, ['--name' => 'John']);
918

@@ -12,7 +21,16 @@ public function it_can_run_console_command_by_class_name_and_optional_parameters
1221
}
1322

1423
/** @test */
15-
public function it_can_run_console_command_by_object_and_optional_parameters()
24+
public function it_can_run_console_command_by_object()
25+
{
26+
$command = $this->runConsoleCommand(new GenericCommand);
27+
28+
$this->assertInstanceOf(GenericCommand::class, $command);
29+
$this->assertEquals('Hello, Dude!', $command->getGreetingMessage());
30+
}
31+
32+
/** @test */
33+
public function it_can_run_console_command_by_object_and_parameters()
1634
{
1735
$command = $this->runConsoleCommand(new GenericCommand, ['--name' => 'Jane']);
1836

0 commit comments

Comments
 (0)