Skip to content

Commit 9c033e7

Browse files
committed
ITT: Tests improved.
1 parent 3e72cda commit 9c033e7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/Helpers/InteractsWithConsoleTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
class InteractsWithConsoleTest extends TestCase
44
{
55
/** @test */
6-
public function it_can_run_console_command_by_class_name_via_object_and_return_it()
6+
public function it_can_run_console_command_by_class_name_and_optional_parameters()
77
{
8-
$command = $this->runConsoleCommand(GenericCommand::class);
8+
$command = $this->runConsoleCommand(GenericCommand::class, ['--name' => 'John']);
9+
910
$this->assertInstanceOf(GenericCommand::class, $command);
10-
$this->assertEquals('Important!', $command->getSomethingImportant());
11+
$this->assertEquals('Hello, John!', $command->getGreetingMessage());
1112
}
1213

1314
/** @test */
14-
public function it_can_run_console_command_by_passed_object_and_return_it()
15+
public function it_can_run_console_command_by_object_and_optional_parameters()
1516
{
16-
$command = $this->runConsoleCommand(new GenericCommand);
17+
$command = $this->runConsoleCommand(new GenericCommand, ['--name' => 'Jane']);
18+
1719
$this->assertInstanceOf(GenericCommand::class, $command);
18-
$this->assertEquals('Important!', $command->getSomethingImportant());
20+
$this->assertEquals('Hello, Jane!', $command->getGreetingMessage());
1921
}
2022
}

0 commit comments

Comments
 (0)