예제 #1
0
 public function testStyleAttribute()
 {
     $column = new Column();
     $column->addStyleAttribute('color:white;');
     $style_attr = $column->getStyleAttribute();
     $expected = 'color:white';
     $this->assertEquals($expected, $style_attr);
     $column->addStyleAttribute(';background-color:black;');
     $style_attr = $column->getStyleAttribute();
     $expected = 'color:white;background-color:black';
     $this->assertEquals($expected, $style_attr);
     $column->addStyleAttribute('position:fixed;top:0;left:50px');
     $style_attr = $column->getStyleAttribute();
     $expected = 'color:white;background-color:black;position:fixed;top:0;left:50px';
     $this->assertEquals($expected, $style_attr);
 }