Skip to content

Commit e5a3d01

Browse files
committed
Width/Height set/get tests
1 parent 0a8635e commit e5a3d01

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/PhpWord/Tests/Style/SectionTest.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,34 @@ public function testMargin()
9696
$this->assertEquals($iVal, $oSettings->getMarginRight());
9797
}
9898

99+
/**
100+
* Set/get page width
101+
*/
102+
public function testPageWidth()
103+
{
104+
// Section Settings
105+
$oSettings = new Section();
106+
107+
$this->assertEquals(11906, $oSettings->getPageSizeW());
108+
$iVal = rand(1, 1000);
109+
$oSettings->setSettingValue('pageSizeW', $iVal);
110+
$this->assertEquals($iVal, $oSettings->getPageSizeW());
111+
}
112+
113+
/**
114+
* Set/get page height
115+
*/
116+
public function testPageHeight()
117+
{
118+
// Section Settings
119+
$oSettings = new Section();
120+
121+
$this->assertEquals(16838, $oSettings->getPageSizeH());
122+
$iVal = rand(1, 1000);
123+
$oSettings->setSettingValue('pageSizeH', $iVal);
124+
$this->assertEquals($iVal, $oSettings->getPageSizeH());
125+
}
126+
99127
/**
100128
* Set/get landscape orientation
101129
*/

0 commit comments

Comments
 (0)