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