File tree 1 file changed +38
-0
lines changed
tests/PhpWordTests/Writer/Word2007/Part
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -645,6 +645,44 @@ public function testWriteCellStyleCellGridSpan(): void
645
645
self ::assertEquals (5 , $ element ->getAttribute ('w:val ' ));
646
646
}
647
647
648
+ /**
649
+ * covers ::_writeCellStyle.
650
+ */
651
+ public function testWriteCellStyleCellNoWrapEnabled (): void
652
+ {
653
+ $ phpWord = new PhpWord ();
654
+ $ section = $ phpWord ->addSection ();
655
+
656
+ $ table = $ section ->addTable ();
657
+ $ table ->addRow ();
658
+
659
+ $ cell = $ table ->addCell (200 );
660
+ $ cell ->getStyle ()->setNoWrap (true );
661
+
662
+ $ doc = TestHelperDOCX::getDocument ($ phpWord );
663
+
664
+ self ::assertTrue ($ doc ->elementExists ('/w:document/w:body/w:tbl/w:tr/w:tc/w:tcPr/w:noWrap ' ));
665
+ }
666
+
667
+ /**
668
+ * covers ::_writeCellStyle.
669
+ */
670
+ public function testWriteCellStyleCellNoWrapDisabled (): void
671
+ {
672
+ $ phpWord = new PhpWord ();
673
+ $ section = $ phpWord ->addSection ();
674
+
675
+ $ table = $ section ->addTable ();
676
+ $ table ->addRow ();
677
+
678
+ $ cell = $ table ->addCell (200 );
679
+ $ cell ->getStyle ()->setNoWrap (false );
680
+
681
+ $ doc = TestHelperDOCX::getDocument ($ phpWord );
682
+
683
+ self ::assertFalse ($ doc ->elementExists ('/w:document/w:body/w:tbl/w:tr/w:tc/w:tcPr/w:noWrap ' ));
684
+ }
685
+
648
686
/**
649
687
* Test write gutter and line numbering.
650
688
*/
You can’t perform that action at this time.
0 commit comments