create(ParserFactory::PREFER_PHP7); } /** * @return void */ public function setUp() { FileChecker::clearCache(); $this->project_checker = new \Psalm\Checker\ProjectChecker(); $this->project_checker->setConfig(new TestConfig()); } /** * @return void */ public function testUndefinedClass() { $stmts = self::$parser->parse('barBar()->bat()->baz()->bam()->bas()->bee()->bet()->bes()->bis(); } } '); $file_checker = new FileChecker('somefile.php', $this->project_checker, $stmts); $file_checker->visitAndAnalyzeMethods(); } /** * @return void */ public function testExcludeIssue() { Config::getInstance()->setCustomErrorLevel('UndefinedFunction', Config::REPORT_SUPPRESS); $stmts = self::$parser->parse('project_checker, $stmts); $file_checker->visitAndAnalyzeMethods(); } }