Example #1
0
 public function testReadWithEpicFail()
 {
     $file = $this->getMock('SplTempFileObject', array('fgetc', 'valid'));
     $file->expects($this->once())->method('fgetc')->will($this->returnValue('x'));
     $file->expects($this->exactly(2))->method('valid')->will($this->onConsecutiveCalls(true, false));
     $this->obj = new FakeParser();
     $this->obj->setFile($file);
     $this->setExpectedException('Tmont\\Midi\\Parsing\\ParseException', 'Unexpected EOF');
     $this->obj->testReadTrue();
 }