Fix parameter input for testWriteParagraphStyle_Pagination
This commit is contained in:
parent
68a4387dcf
commit
26330807f7
|
|
@ -88,10 +88,10 @@ class PHPWord_Writer_Word2007_BaseTest extends \PHPUnit_Framework_TestCase {
|
||||||
$PHPWord = new PHPWord();
|
$PHPWord = new PHPWord();
|
||||||
$section = $PHPWord->createSection();
|
$section = $PHPWord->createSection();
|
||||||
$attributes = array(
|
$attributes = array(
|
||||||
'widowControl' => 0,
|
'widowControl' => false,
|
||||||
'keepNext' => 1,
|
'keepNext' => true,
|
||||||
'keepLines' => 1,
|
'keepLines' => true,
|
||||||
'pageBreakBefore' => 1,
|
'pageBreakBefore' => true,
|
||||||
);
|
);
|
||||||
foreach ($attributes as $attribute => $value) {
|
foreach ($attributes as $attribute => $value) {
|
||||||
$section->addText('Test', null, array($attribute => $value));
|
$section->addText('Test', null, array($attribute => $value));
|
||||||
|
|
@ -100,11 +100,12 @@ class PHPWord_Writer_Word2007_BaseTest extends \PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
// Test the attributes
|
// Test the attributes
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($attributes as $attribute => $value) {
|
foreach ($attributes as $key => $value) {
|
||||||
$i++;
|
$i++;
|
||||||
$path = "/w:document/w:body/w:p[{$i}]/w:pPr/w:{$attribute}";
|
$path = "/w:document/w:body/w:p[{$i}]/w:pPr/w:{$key}";
|
||||||
$element = $doc->getElement($path);
|
$element = $doc->getElement($path);
|
||||||
$this->assertEquals($value, $element->getAttribute('w:val'));
|
$expected = $value ? 1 : 0;
|
||||||
|
$this->assertEquals($expected, $element->getAttribute('w:val'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue