コード例 #1
0
 /**
  * Test setStyleValue method
  */
 public function testSetStyleValue()
 {
     $object = new TextBox();
     $properties = array('width' => 200, 'height' => 200, 'align' => 'left', 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', 'positioning' => 'absolute', 'posHorizontal' => 'center', 'posVertical' => 'top', 'posHorizontalRel' => 'margin', 'posVerticalRel' => 'page', 'innerMarginTop' => '5', 'innerMarginRight' => '5', 'innerMarginBottom' => '5', 'innerMarginLeft' => '5', 'borderSize' => '2', 'borderColor' => 'red');
     foreach ($properties as $key => $value) {
         $get = "get{$key}";
         $object->setStyleValue("{$key}", $value);
         $this->assertEquals($value, $object->{$get}());
     }
 }