public function testHasErrors() { $sut = new Dfp_Datafeed_File_Reader(); $mockFormat = $this->getMock('Dfp_Datafeed_File_Reader_Format_Interface'); $mockFormat->expects($this->once())->method('hasErrors')->will($this->returnValue(true)); $sut->setFormat($mockFormat); $this->assertEquals(true, $sut->hasErrors()); }