application = $application; $this->input = new ArrayInput([ 'command' => $command ] + $params); } /** * Run this command. * * @return CommandTest */ public function run() { $this->output = new BufferedOutput(); $this->exitCode = $this->application->run($this->input, $this->output); return $this; } /** * Get exit code. * * @return integer */ public function getExitCode() { return $this->exitCode; } /** * Get output. * * @return string */ public function getOutput() { return $this->output->fetch(); } }