Esempio n. 1
0
 /**
  * @group 159
  * @covers ::color
  */
 public function testColorUnknownColorName()
 {
     $config = $this->getMock('Mage\\Config');
     $config->expects($this->once())->method('getParameter')->with($this->noColorParameter)->will($this->returnValue(false));
     $string = '<foo>FooBar</foo>';
     // Method need to be non static in the future
     $result = Colors::color($string, $config);
     $this->assertSame($string, $result);
 }
Esempio n. 2
0
 /**
  * Outputs a message to the user's screen.
  *
  * @param string $message
  * @param integer $tabs
  * @param integer $newLine
  */
 public static function output($message, $tabs = 1, $newLine = 1)
 {
     self::log(strip_tags($message));
     self::$screenBuffer .= str_repeat("\t", $tabs) . strip_tags($message) . str_repeat(PHP_EOL, $newLine);
     $output = str_repeat("\t", $tabs) . Colors::color($message, self::$config) . str_repeat(PHP_EOL, $newLine);
     echo $output;
 }