Esempio n. 1
0
 /**
  * @expectedException Jm_Console_Exception
  */
 public function testWriteFailed()
 {
     // open a readonly file descriptor
     $fd = fopen(__FILE__, 'r');
     $output = new Jm_Console_Output($fd);
     // the following line should throw an exception
     $output->write('hello');
 }
Esempio n. 2
0
 /**
  * Writes $message to STDERR
  *
  * @param string                             $message The message to print
  * @param Jm_Console_Output_TextStyle|string $style   The text style
  *
  * @return Jm_Console
  * 
  * @throws Jm_Console_Output_Exception if fwrite fails
  *
  * @codeCoverageIgnore
  */
 public function error($message, $style = NULL)
 {
     $this->stderr->write($message, $style);
     return $this;
 }