/** * @expectedException InvalidArgumentException * @depends testInterface * @return null */ public function testSetTitleNotTitleTag_Failure() { $myTitle = $this->getMock($this->tagInterface); $myTitle->expects($this->once())->method('getTagName')->will($this->returnValue('image')); $this->htmlDoc->setTitleTag($myTitle); }