setStyleValue($property, $value); $this->assertEquals($value, $object->$get()); } } /** * Test cell margin */ public function testCellMargin() { $object = new Table(); $parts = array('Top', 'Left', 'Right', 'Bottom'); // Set cell margin and test if each part has the same margin // While looping, push values array to be asserted with getCellMargin $value = 240; // In twips foreach ($parts as $part) { $set = "setCellMargin{$part}"; $get = "getCellMargin{$part}"; $values[] = $value; $object->$set($value); $this->assertEquals($value, $object->$get()); } $this->assertEquals($values, $object->getCellMargin()); } }