public function testConstructor() { $tag = new GenericVoidTag('foo', true); $this->assertEquals('<foo />', $tag->getHTML()); }
/** * @param string $src * @param string $alt * @param bool $withSelfClosing */ public function __construct($src, $alt = '', $withSelfClosing = false) { $this->setAttribute('src', $src); $this->setAttribute('alt', $alt); parent::__construct('img', $withSelfClosing); }