File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Tests/PHPWord/Writer/Word2007 Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -88,10 +88,10 @@ public function testWriteParagraphStyle_Pagination()
88
88
$ PHPWord = new PHPWord ();
89
89
$ section = $ PHPWord ->createSection ();
90
90
$ attributes = array (
91
- 'widowControl ' => 0 ,
92
- 'keepNext ' => 1 ,
93
- 'keepLines ' => 1 ,
94
- 'pageBreakBefore ' => 1 ,
91
+ 'widowControl ' => false ,
92
+ 'keepNext ' => true ,
93
+ 'keepLines ' => true ,
94
+ 'pageBreakBefore ' => true ,
95
95
);
96
96
foreach ($ attributes as $ attribute => $ value ) {
97
97
$ section ->addText ('Test ' , null , array ($ attribute => $ value ));
@@ -100,11 +100,12 @@ public function testWriteParagraphStyle_Pagination()
100
100
101
101
// Test the attributes
102
102
$ i = 0 ;
103
- foreach ($ attributes as $ attribute => $ value ) {
103
+ foreach ($ attributes as $ key => $ value ) {
104
104
$ i ++;
105
- $ path = "/w:document/w:body/w:p[ {$ i }]/w:pPr/w: {$ attribute }" ;
105
+ $ path = "/w:document/w:body/w:p[ {$ i }]/w:pPr/w: {$ key }" ;
106
106
$ element = $ doc ->getElement ($ path );
107
- $ this ->assertEquals ($ value , $ element ->getAttribute ('w:val ' ));
107
+ $ expected = $ value ? 1 : 0 ;
108
+ $ this ->assertEquals ($ expected , $ element ->getAttribute ('w:val ' ));
108
109
}
109
110
}
110
111
You can’t perform that action at this time.
0 commit comments