DrawMyAttention\ResourceGenerator\Commands\ResourceGeneratorTest::runArtisanCommand PHP Method

runArtisanCommand() public method

public runArtisanCommand ( $class, array $parameters = [] ) : Symfony\Component\Console\Tester\CommandTester
$class Command class to be called.
$parameters array
return Symfony\Component\Console\Tester\CommandTester
    public function runArtisanCommand($class, $parameters = [])
    {
        $command = $this->app->make($class);
        $command->setLaravel($this->app->getInstance());
        $commandTester = new CommandTester($command);
        $commandTester->execute($parameters);
        return $commandTester;
    }