PHPUnit_TextUI_ResultPrinter::writeWithColor PHP Méthode

writeWithColor() protected méthode

Writes a buffer out with a color sequence if colors are enabled.
protected writeWithColor ( string $color, string $buffer, boolean $lf = true )
$color string
$buffer string
$lf boolean
    protected function writeWithColor($color, $buffer, $lf = true)
    {
        $this->write($this->formatWithColor($color, $buffer));
        if ($lf) {
            $this->write("\n");
        }
    }

Usage Example

 protected function writeWithColor($color, $buffer, $lf = true)
 {
     if ($this->capture) {
         $this->color = $color;
         $this->buffer .= $buffer;
     } else {
         parent::writeWithColor($color, $buffer, $lf);
     }
 }
All Usage Examples Of PHPUnit_TextUI_ResultPrinter::writeWithColor