Returns the node attributes or null, if it is not DOMElement.
public attributes ( ) : array | null | ||
return | array | null |
public function testAttributes() { $attributes = ['type' => 'text', 'name' => 'username']; $element = new Element('input', null, $attributes); $this->assertEquals($attributes, $element->attributes()); }