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 195465c commit 48da6e1Copy full SHA for 48da6e1
src/Helpers/InteractsWithConsole.php
@@ -2,14 +2,17 @@
2
3
namespace Illuminated\Testing\Helpers;
4
5
+use Illuminate\Console\Command;
6
use Symfony\Component\Console\Input\ArrayInput;
7
use Symfony\Component\Console\Output\BufferedOutput;
8
9
trait InteractsWithConsole
10
{
- protected function runConsoleCommand($class, array $parameters = [])
11
+ protected function runConsoleCommand($command, array $parameters = [])
12
- $command = new $class;
13
+ if (!($command instanceof Command)) {
14
+ $command = new $command;
15
+ }
16
17
$command->setLaravel($this->app);
18
$command->run(new ArrayInput($parameters), new BufferedOutput);
0 commit comments