Skip to content

Commit 2633080

Browse files
committed
Fix parameter input for testWriteParagraphStyle_Pagination
1 parent 68a4387 commit 2633080

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Tests/PHPWord/Writer/Word2007/BaseTest.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ public function testWriteParagraphStyle_Pagination()
8888
$PHPWord = new PHPWord();
8989
$section = $PHPWord->createSection();
9090
$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,
9595
);
9696
foreach ($attributes as $attribute => $value) {
9797
$section->addText('Test', null, array($attribute => $value));
@@ -100,11 +100,12 @@ public function testWriteParagraphStyle_Pagination()
100100

101101
// Test the attributes
102102
$i = 0;
103-
foreach ($attributes as $attribute => $value) {
103+
foreach ($attributes as $key => $value) {
104104
$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}";
106106
$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'));
108109
}
109110
}
110111

0 commit comments

Comments
 (0)