Ejemplo n.º 1
0
 /**
  * @return	null
  */
 public function testAddJsBodyScriptTagsNoDuplicates()
 {
     $src = 'my-file.js';
     $tag1 = new Script();
     $tag1->addAttribute('src', $src);
     $tag2 = new Script();
     $tag2->addAttribute('src', $src);
     $this->assertFalse($this->htmlDoc->isJsBodyScript($src));
     $this->htmlDoc->addJsBodyScriptTag($tag1)->addJsBodyScriptTag($tag2);
     $this->assertTrue($this->htmlDoc->isJsBodyScript($src));
     $expected = array($tag2);
     $this->assertEquals($expected, $this->htmlDoc->getJsBodyScriptTags());
 }