Skip to content

Commit e351717

Browse files
author
Roman Syroeshko
committed
Merged #495.
1 parent eff9ca2 commit e351717

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

samples/Sample_12_HeaderFooter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
// Add footer
3131
$footer = $section->addFooter();
32-
$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.'), array('align' => 'center'));
32+
$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.'), null, array('align' => 'center'));
3333
$footer->addLink('http://google.com', htmlspecialchars('Direct Google'));
3434

3535
// Write some text

tests/PhpWord/Tests/Element/PreserveTextTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public function testConstructWithArray()
5757
{
5858
$oPreserveText = new PreserveText(
5959
'text',
60-
array('align' => 'center'),
61-
array('marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600)
60+
array('size' => 16, 'color' => '1B2232'),
61+
array('align' => 'center')
6262
);
6363
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle());
6464
$this->assertInstanceOf(

0 commit comments

Comments
 (0)