/** * @expectedException InvalidArgumentException * @return null */ public function testLoadJsBodyScriptTags_ItemEmptySrcFailure() { $tag1 = new Script('my-file.js'); $tag2 = $this->getMock($this->tagInterface); $tag2->expects($this->once())->method('getTagName')->will($this->returnValue('script')); $tag2->expects($this->once())->method('getAttribute')->with($this->equalTo('src'))->will($this->returnValue('')); $tag3 = new Script('there-file.js'); $list = array($tag1, $tag2, $tag3); $this->assertSame($this->htmlDoc, $this->htmlDoc->loadJsBodyScriptTags($list)); $this->assertEquals($list, $this->htmlDoc->getJsBodyScriptTags()); }