Skip to content

Commit 03027ef

Browse files
committed
ITT: Helper method renamed.
1 parent c8647cf commit 03027ef

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Provides Laravel-specific testing helpers and asserts.
6363
- [emulateProduction](#emulateproduction)
6464
- [emulateEnvironment](#emulateenvironment)
6565
- [ArtisanHelpers](#artisanhelpers)
66-
- [runConsoleCommand](#runconsolecommand)
66+
- [runArtisan](#runartisan)
6767
6868
## Available asserts
6969
@@ -141,18 +141,18 @@ $this->emulateEnvironment('space');
141141
142142
### ArtisanHelpers
143143
144-
#### `runConsoleCommand()`
144+
#### `runArtisan()`
145145
146-
Runs console command directly by the class name, and return it:
146+
Runs artisan command directly by the class name, and return it:
147147
148148
```php
149-
$command = $this->runConsoleCommand(MyCommand::class, ['--name' => 'John']);
149+
$command = $this->runArtisan(MyCommand::class, ['--name' => 'John']);
150150
```
151151
152-
Also, you can run command via command object directly:
152+
Also, you can run artisan command via command object directly:
153153
154154
```php
155-
$command = $this->runConsoleCommand(new MyCommand, ['--name' => 'Jane']);
155+
$command = $this->runArtisan(new MyCommand, ['--name' => 'Jane']);
156156
```
157157
158158
## Asserts

src/Helpers/ArtisanHelpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
trait ArtisanHelpers
1010
{
11-
protected function runConsoleCommand($command, array $parameters = [])
11+
protected function runArtisan($command, array $parameters = [])
1212
{
1313
if (!($command instanceof Command)) {
1414
$command = new $command;

tests/Helpers/ArtisanHelpersTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,36 @@
33
class ArtisanHelpersTest extends TestCase
44
{
55
/** @test */
6-
public function it_can_run_console_command_by_class_name()
6+
public function it_can_run_artisan_command_by_class_name()
77
{
8-
$command = $this->runConsoleCommand(GenericCommand::class);
8+
$command = $this->runArtisan(GenericCommand::class);
99

1010
$this->assertInstanceOf(GenericCommand::class, $command);
1111
$this->assertEquals('Hello, Dude!', $command->getGreetingMessage());
1212
}
1313

1414
/** @test */
15-
public function it_can_run_console_command_by_class_name_and_parameters()
15+
public function it_can_run_artisan_command_by_class_name_and_parameters()
1616
{
17-
$command = $this->runConsoleCommand(GenericCommand::class, ['--name' => 'John']);
17+
$command = $this->runArtisan(GenericCommand::class, ['--name' => 'John']);
1818

1919
$this->assertInstanceOf(GenericCommand::class, $command);
2020
$this->assertEquals('Hello, John!', $command->getGreetingMessage());
2121
}
2222

2323
/** @test */
24-
public function it_can_run_console_command_by_object()
24+
public function it_can_run_artisan_command_by_object()
2525
{
26-
$command = $this->runConsoleCommand(new GenericCommand);
26+
$command = $this->runArtisan(new GenericCommand);
2727

2828
$this->assertInstanceOf(GenericCommand::class, $command);
2929
$this->assertEquals('Hello, Dude!', $command->getGreetingMessage());
3030
}
3131

3232
/** @test */
33-
public function it_can_run_console_command_by_object_and_parameters()
33+
public function it_can_run_artisan_command_by_object_and_parameters()
3434
{
35-
$command = $this->runConsoleCommand(new GenericCommand, ['--name' => 'Jane']);
35+
$command = $this->runArtisan(new GenericCommand, ['--name' => 'Jane']);
3636

3737
$this->assertInstanceOf(GenericCommand::class, $command);
3838
$this->assertEquals('Hello, Jane!', $command->getGreetingMessage());

0 commit comments

Comments
 (0)