public function testAfterSetFile() { //see http://www.phpunit.de/ticket/1046 for why we're mocking fgets() for no reason $file = $this->getMock('SplTempFileObject', array('fgets')); $deltaParser = $this->getMock('Tmont\\Midi\\Parsing\\DeltaParser', array('setFile'), array(), '', false); $deltaParser->expects($this->once())->method('setFile')->with($file); $eventParser = $this->getMock('Tmont\\Midi\\Parsing\\EventParser', array('setFile'), array(), '', false); $eventParser->expects($this->once())->method('setFile')->with($file); $this->obj = new TrackParser($eventParser, $deltaParser); $this->obj->setFile($file); }
/** * @since 1.0 * @uses TrackParser::setFile() */ protected function afterLoad() { $this->trackParser->setFile($this->file); }