/** * Tests InvalidArgumentException of enforceIsatty() * * @expectedException InvalidArgumentException */ public function testEnforceIsattyException() { $stream = new Jm_Console_IoStream(STDOUT); // should throw an InvalidArgumentException as the // argument isn't a boolean $stream->enforceIsatty('test'); }
/** * Constructor * * @throws InvalidArgumentException If something is wrong with STDIN. * This exception was never observed. */ public function __construct() { parent::__construct(STDIN); }
/** * Constructor * * @param resource $fd An open file descriptior * * @throws InvalidArgumentException if gettype($fd) !== 'integer' */ public function __construct($fd = STDOUT) { parent::__construct($fd); $this->ansiEnabled = TRUE; }