$this->
assertSame('called'.\PHP_EOL,
$tester->
getDisplay(), '->run() does not call interact() if -n is passed'
);
} public function testRunWithGlobalOptionAndNoCommand() { $application =
new Application();
$application->
setAutoExit(false
);
$application->
setCatchExceptions(false
);
$application->
getDefinition()->
addOption(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL
));
$output =
new StreamOutput(fopen('php://memory', 'w', false
));
$input =
new ArgvInput(['cli.php', '--foo', 'bar'
]);
$this->
assertSame(0,
$application->
run($input,
$output));
} /**
* Issue #9285.
*
* If the "verbose" option is just before an argument in ArgvInput,
* an argument value should not be treated as verbosity value.
* This test will fail with "Not enough arguments." if broken
*/