Skip to content

Commit

Permalink
Width/Height set/get tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spikex committed Oct 2, 2014
1 parent 0a8635e commit e5a3d01
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/PhpWord/Tests/Style/SectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,34 @@ public function testMargin()
$this->assertEquals($iVal, $oSettings->getMarginRight());
}

/**
* Set/get page width
*/
public function testPageWidth()
{
// Section Settings
$oSettings = new Section();

$this->assertEquals(11906, $oSettings->getPageSizeW());
$iVal = rand(1, 1000);
$oSettings->setSettingValue('pageSizeW', $iVal);
$this->assertEquals($iVal, $oSettings->getPageSizeW());
}

/**
* Set/get page height
*/
public function testPageHeight()
{
// Section Settings
$oSettings = new Section();

$this->assertEquals(16838, $oSettings->getPageSizeH());
$iVal = rand(1, 1000);
$oSettings->setSettingValue('pageSizeH', $iVal);
$this->assertEquals($iVal, $oSettings->getPageSizeH());
}

/**
* Set/get landscape orientation
*/
Expand Down

0 comments on commit e5a3d01

Please sign in to comment.