The callable receives four arguments:
* {@link RawArgs}: The raw console arguments.
* {@link Input}: The input.
* {@link Output}: The output.
* {@link Output}: The error output.
The input and output instances may be null if none were passed to
{@link Application::run()}.
public setIOFactory ( callable $ioFactory ) : static | ||
$ioFactory | callable | The {@link IO} factory callable. |
return | static | The current instance. |
/** * @expectedException \LogicException */ public function testFailIfNoIOFactory() { $this->config->setIOFactory(null); $args = new StringArgs(''); $application = new ConsoleApplication($this->config); $application->run($args); }
/** * @expectedException \InvalidArgumentException */ public function testSetIOFactoryFailsIfNeitherCallableNorNull() { $this->config->setIOFactory(1234); }