public function testParseWithInvalidState() { $this->obj = $this->getMock('Tmont\\Midi\\Parsing\\FileParser', array('getState'), array(), '', false); $this->obj->expects($this->once())->method('getState')->will($this->returnValue(-1)); $this->setExpectedException('Tmont\\Midi\\Parsing\\StateException'); $this->obj->parse(); }