/** * Add text non-UTF8 */ public function testAddTextNotUTF8() { $oFooter = new Footer(1); $element = $oFooter->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); }