示例#1
0
 /**
  * Test setStyleValue method
  */
 public function testSetStyleValue()
 {
     $object = new Line();
     $properties = array('connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT, 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, 'weight' => 10, 'color' => 'red');
     foreach ($properties as $key => $value) {
         $get = "get{$key}";
         $object->setStyleValue("{$key}", $value);
         $this->assertEquals($value, $object->{$get}());
     }
 }