Esempio n. 1
0
 /**
  * Write an optionally colored message
  * 
  * @param string $message
  * @param string $pallet
  * @return DbPatch_Core_Writer
  */
 public function _message($message, $pallet = '')
 {
     if ($this->_color !== null && $pallet != '') {
         $message = $this->_color->pallet($pallet) . $message . $this->_color->reset();
     }
     $message .= PHP_EOL;
     $stream = null;
     if ($pallet != 'info') {
         $stream = STDERR;
     }
     return $this->output($message, $stream);
 }
Esempio n. 2
0
 public function testReset()
 {
     $color = new DbPatch_Core_Color();
     $this->assertEquals($color->reset(), "");
     $this->assertEquals($color->reset(false), "");
 }