public function testGetAttribute() { $domElement = $this->createDomElement('input'); $element = new Element($domElement); $this->assertEquals("default", $element->getAttribute("value", "default")); $domElement->setAttribute("value", "test"); $element = new Element($domElement); $this->assertEquals("test", $element->getAttribute("value")); }
public function testGetAttribute() { $domElement = $this->createDomElement('input'); $element = new Element($domElement); $this->assertEquals(null, $element->getAttribute('value')); $this->assertEquals('default', $element->getAttribute('value', 'default')); $domElement->setAttribute('value', 'test'); $element = new Element($domElement); $this->assertEquals('test', $element->getAttribute('value')); }