/** * @expectedException \UnexpectedValueException */ public function testOutOfScopeException() { $parser = new Parser(' This is a test 4-2'); $parser->setThrowExceptions(); echo $parser->getResult(); }