We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50e4093 commit 1da324fCopy full SHA for 1da324f
README.md
@@ -129,10 +129,16 @@ $this->emulateProduction();
129
130
#### `runConsoleCommand()`
131
132
-Runs console command by the direct `run` method call, through the object. Returns command object:
+Runs console command by the direct `run` method call, through the class name with ability to set parameters:
133
134
```php
135
-$command = $this->runConsoleCommand(MyCommand::class);
+$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']);
142
```
143
144
## Asserts
0 commit comments