public function attr($name, $value = null) { if ($value === null) { return $this->getAttribute($name); } return $this->setAttribute($name, $value); }
public function testAttrGet() { $domElement = $this->createDomElement('input'); $domElement->setAttribute("value", "test"); $element = new Element($domElement); $this->assertEquals("test", $element->attr("value")); }