Пример #1
0
 /**
  * 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');
 }
Пример #2
0
 /**
  * Constructor
  *
  * @throws InvalidArgumentException If something is wrong with STDIN.
  * This exception was never observed.
  */
 public function __construct()
 {
     parent::__construct(STDIN);
 }
Пример #3
0
 /**
  * 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;
 }