Пример #1
0
 /**
  * Test that adding a format is case insensitive
  *
  * @return void
  */
 public function test_caseInsensitive()
 {
     Format::addFormat('TEST', array('foreground' => 'cyan'));
     Format::addFormat('test2', array('foreground' => 'cyan'));
     $str1 = Format::format('<Test>teststr</Test>');
     $str2 = Format::format('<Test2>teststr</Test2>');
     $this->assertNotContains('Test', $str1);
     $this->assertNotContains('Test2', $str2);
 }
Пример #2
0
 /**
  * Write a single line
  *
  * @return void
  */
 public function writeln($str)
 {
     fputs($this->output, Format::format($str) . "\n");
 }