Beispiel #1
0
 public function testConstructor()
 {
     $tag = new GenericVoidTag('foo', true);
     $this->assertEquals('<foo />', $tag->getHTML());
 }
Beispiel #2
0
 /**
  * @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);
 }