TablePosition::VANCHOR_PAGE, 'bottomFromText' => 20]; $object = new TablePosition($styleTable); self::assertEquals(TablePosition::VANCHOR_PAGE, $object->getVertAnchor()); self::assertEquals(20, $object->getBottomFromText()); } /** * Test setting style with normal value. */ public function testSetGetNormal(): void { $object = new TablePosition(); $attributes = [ 'leftFromText' => 4, 'rightFromText' => 4, 'topFromText' => 4, 'bottomFromText' => 4, 'vertAnchor' => TablePosition::VANCHOR_PAGE, 'horzAnchor' => TablePosition::HANCHOR_TEXT, 'tblpXSpec' => TablePosition::XALIGN_CENTER, 'tblpX' => 5, 'tblpYSpec' => TablePosition::YALIGN_OUTSIDE, 'tblpY' => 6, ]; foreach ($attributes as $key => $value) { $set = "set{$key}"; $get = "get{$key}"; $object->$set($value); self::assertEquals($value, $object->$get()); } } }