コード例 #1
0
ファイル: StringFormatterTest.php プロジェクト: itkg/log
 /**
  * @covers Itkg\Log\Formatter\StringFormatter::format
  */
 public function testFormat()
 {
     $text = "it's a test";
     $this->assertEquals($text, $this->object->format(array('message' => $text)));
     $text = "it's a test with éàêâ";
     $this->assertEquals('UTF-8', mb_detect_encoding($this->object->format(array('message' => $text))));
     $text = "it is a new text";
     $textEncodeUtf8 = utf8_encode($text);
     $this->assertEquals($textEncodeUtf8, $this->object->format(array('message' => $text)));
     $this->assertEquals($text, utf8_decode($this->object->format(array('message' => $text))));
 }
コード例 #2
0
ファイル: SimpleFormatterTest.php プロジェクト: itkg/log
 /**
  * @covers Itkg\Log\Formatter\SimpleFormatter::format
  */
 public function testFormat()
 {
     $text = "it's a test";
     $this->assertEquals($text, $this->object->format(array('message' => $text)));
 }