示例#1
0
 public function testAddClass()
 {
     $element = new Element('test');
     $element->setClass('yo');
     $this->assertEquals('yo', $element->getClass());
     $element->addClass('yo');
     $this->assertEquals('yo', $element->getClass());
     $element->addClass('yo2');
     $this->assertEquals('yo yo2', $element->getClass());
     $element->removeClass('yo');
     $this->assertEquals('yo2', $element->getClass());
 }