getDisplay()` or `->getStatusCode()` on it. * * @param Command $command * @param array $arguments The command line arguments, array of key=>value * Examples: * - named arguments: ['model' => 'Post'] * - boolean flags: ['--all' => true] * - arguments with values: ['--arg' => 'value'] * @param array $interactiveInput Interactive responses to the command * I.e. anything the command `->ask()` or `->confirm()`, etc. * @return CommandTester */ protected function runCommand(Command $command, array $arguments = [], array $interactiveInput = []): CommandTester { // TODO: once Laravel 5.5 is dropped, call `$this->withoutMockingConsoleOutput()` instead $this->app->offsetUnset(OutputStyle::class); $command->setLaravel($this->app); $tester = new CommandTester($command); $tester->setInputs($interactiveInput); $tester->execute($arguments); return $tester; } protected function assertMatchesPhpSnapshot(?string $actualContent) { $this->assertMatchesSnapshot($actualContent, new SnapshotPhpDriver()); } protected function assertMatchesTxtSnapshot(?string $actualContent) { $this->assertMatchesSnapshot($actualContent, new SnapshotTxtDriver()); } }