Beispiel #1
0
 /**
  * Add list item non-UTF8
  */
 public function testAddListItemNotUTF8()
 {
     $oCell = new Cell('section', 1);
     $element = $oCell->addListItem(utf8_decode('ééé'));
     $this->assertCount(1, $oCell->getElements());
     $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItem', $element);
     $this->assertEquals($element->getTextObject()->getText(), 'ééé');
 }
Beispiel #2
0
 /**
  * Add list item non-UTF8
  */
 public function testAddListItemNotUTF8()
 {
     $oCell = new Cell();
     $element = $oCell->addListItem(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')));
     $this->assertCount(1, $oCell->getElements());
     $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItem', $element);
     $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getTextObject()->getText());
 }