Esempio n. 1
0
 public function testPrintEofWhileParsingTrack()
 {
     $formatter = $this->getMock('Tmont\\Midi\\Reporting\\Formatter', array('beforeChunk', 'afterChunk', 'afterTrack', 'afterFile'));
     $formatter->expects($this->never())->method('beforeChunk');
     $formatter->expects($this->never())->method('afterChunk');
     $formatter->expects($this->once())->method('afterTrack');
     $formatter->expects($this->once())->method('afterFile');
     $parser = $this->getMock('Tmont\\Midi\\Parsing\\Parser', array('parse'));
     $parser->expects($this->once())->method('parse')->will($this->returnValue(null));
     $this->obj = $this->getMock('Tmont\\Midi\\Reporting\\Printer', array('isParsingTrack'), array($formatter, $parser));
     $this->obj->expects($this->once())->method('isParsingTrack')->will($this->returnValue(true));
     $this->obj->printNext();
 }