/** * @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)))); }
/** * @covers Itkg\Log\Formatter\SimpleFormatter::format */ public function testFormat() { $text = "it's a test"; $this->assertEquals($text, $this->object->format(array('message' => $text))); }