public function testSetAttributeNoArray() { $tag = new Tag('a'); $tag->setAttribute('href', 'http://google.com'); $attribute = $tag->getAttribute('href'); $this->assertEquals('http://google.com', $attribute['value']); }
/** * A wrapper method that simply calls the setAttribute method * on the tag of this node. * * @param string $key * @param string $value * @return $this */ public function setAttribute($key, $value) { $this->tag->setAttribute($key, $value); return $this; }