Skip to content

Commit 87c17d4

Browse files
authored
Word2007 Reader : Added unit test
1 parent 63db124 commit 87c17d4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/PhpWordTests/Reader/Word2007/StyleTest.php

+21
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,27 @@ public function testReadHidden(): void
190190
self::assertTrue($fontStyle->isHidden());
191191
}
192192

193+
public function testReadTableCellNoWrap(): void
194+
{
195+
$documentXml = '<w:tbl>
196+
<w:tr>
197+
<w:tc>
198+
<w:tcPr>
199+
<w:noWrap />
200+
</w:tcPr>
201+
</w:tc>
202+
</w:tr>
203+
</w:tbl>';
204+
205+
$phpWord = $this->getDocumentFromString(['document' => $documentXml]);
206+
207+
$elements = $phpWord->getSection(0)->getElements();
208+
self::assertInstanceOf('PhpOffice\PhpWord\Element\Table', $elements[0]);
209+
$rows = $elements[0]->getRows();
210+
$cells = $rows[0]->getCells();
211+
self::assertTrue($cells[0]->getStyle()->getNoWrap());
212+
}
213+
193214
public function testReadHeading(): void
194215
{
195216
Style::resetStyles();

0 commit comments

Comments
 (0)