/** * Set settings */ public function testSetStyle() { $expected = 'landscape'; $object = new Section(0); $object->setStyle(array('orientation' => $expected, 'foo' => null)); $this->assertEquals($expected, $object->getStyle()->getOrientation()); }
/** * Read w:sectPr node. * * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \DOMElement $node * @param \PhpOffice\PhpWord\Element\Section &$section * @return void */ private function readWSectPrNode(XMLReader $xmlReader, \DOMElement $node, Section &$section) { $style = $this->readSectionStyle($xmlReader, $node); $section->setStyle($style); $this->readHeaderFooter($style, $section); }