Skip to content

Commit 1da324f

Browse files
committed
ITT: Readme fixes.
1 parent 50e4093 commit 1da324f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,16 @@ $this->emulateProduction();
129129
130130
#### `runConsoleCommand()`
131131
132-
Runs console command by the direct `run` method call, through the object. Returns command object:
132+
Runs console command by the direct `run` method call, through the class name with ability to set parameters:
133133
134134
```php
135-
$command = $this->runConsoleCommand(MyCommand::class);
135+
$command = $this->runConsoleCommand(MyCommand::class, ['--name' => 'John']);
136+
```
137+
138+
Also, you can pass command object directly instead of class name:
139+
140+
```php
141+
$command = $this->runConsoleCommand(new MyCommand, ['--name' => 'Jane']);
136142
```
137143
138144
## Asserts

0 commit comments

Comments
 (0)