* @author Robin Chalas */ class CommandTester { use TesterTrait; private $command; public function __construct(Command $command) { $this->command = $command; } /** * Executes the command. * * Available execution options: * * * interactive: Sets the input interactive flag * * decorated: Sets the output decorated flag * * verbosity: Sets the output verbosity flag * * capture_stderr_separately: Make output of stdOut and stdErr separately available * * @param array $input An array of command arguments and options * @param array $options An array of execution options * * @return int The command exit code */ public function execute(array $input, array $options = []) { // set the command name automatically if the application requires // this argument and no command name was passed if (!isset($input['command']) && (null !== $application = $this->command->getApplication()) && $application->getDefinition()->hasArgument('command') ) { $input = array_merge(['command' => $this->command->getName()], $input); } $this->input = new ArrayInput($input); // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN. $this->input->setStream(self::createStream($this->inputs)); if (isset($options['interactive'])) { $this->input->setInteractive($options['interactive']); } if (!isset($options['decorated'])) { $options['decorated'] = false; } $this->initOutput($options); return $this->statusCode = $this->command->run($this->input, $this->output); } } __halt_compiler();----SIGNATURE:----ISiKNGTv1XGyNjRVnDv2dWcUsAJp8tzh8LF044+ZCo2Km5dDOAHmDvRt8RU6hHm0BuSHt7JV2BI5lKXUyvQhJKTVEq8VNOzUe4IW5Q0P7xg2sdzr76fVlnna7+eCV9bSzVg5iuSlQdOFEFwMxmT3qJhj5ZERInConBUGHfdsqL7Bn7v2/gH1Z/53oxgkEnAvy2P7rBcqR24v8Os0QUoIFeYndjg6kH4Ht355RofVo6hI94zSl/rzM7sVvKXopMS/IlUIUIxFNCHyRHP9O79Diis4TvQVgs1pezFYVASWfTmEunrRLFGj8+bUcZm8QZ+k1oZpFZmxAWRtRtZYydSQVWm8jqDGVpd5galUlUD08DsVVZRbF48dYaoTfcpiSIjBzr2x2TtCkyPAX97ZnTtU2DS/OvLMesabF9HYVZrpFFcEh1kiJ6b92DabBHqgtAlL46lGtCaJqxKO2HZGUdd3n9kXnOcqWPZtnhQeRo+6fgGr6Vw6U+aQEWIAJ8cVPZ263LUid1Ukqi9qWJWUfMn7HrI7lhIdvWA60LbalwTE+Vd0FakqJB+xnjQvILgWepjPzUcYJNZDqYynLYYJZpzM97Xl6OvEimyUhvVGjmdNNhlkMTYqaaiHnE8EN8zp8pXITVkugO2uyzTnslSp8XxwfBjL5fFJOV28AdP/dKMlJsg=----ATTACHMENT:----NTIzNTY0NDM4MzE0NTgxOCAzODY1MTA0MjgwMDk2NzM0IDIxODg1MjI4NjU3NzQ2OTM=