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