create(ParserFactory::PREFER_PHP7); } public function setUp() { $config = new TestConfig(); $config->throw_exception = true; FileChecker::clearCache(); } public function testUndefinedClass() { $stmts = self::$parser->parse('bar()->bat()->baz()->bam()->bas()->bee()->bet()->bes()->bis(); } } '); $file_checker = new FileChecker('somefile.php', $stmts); $file_checker->check(); } public function testExcludeIssue() { Config::getInstance()->setCustomErrorLevel('UndefinedFunction', Config::REPORT_SUPPRESS); $stmts = self::$parser->parse('check(); } }