Ejemplo n.º 1
0
 /**
  * Add preserve text non-UTF8
  */
 public function testAddPreserveTextNotUTF8()
 {
     $oFooter = new Footer(1);
     $element = $oFooter->addPreserveText(utf8_decode('ééé'));
     $this->assertCount(1, $oFooter->getElements());
     $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element);
     $this->assertEquals($element->getText(), array('ééé'));
 }
Ejemplo n.º 2
0
 /**
  * Add preserve text non-UTF8
  */
 public function testAddPreserveTextNotUTF8()
 {
     $oFooter = new Footer(1);
     $element = $oFooter->addPreserveText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')));
     $this->assertCount(1, $oFooter->getElements());
     $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element);
     $this->assertEquals(array(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), $element->getText());
 }