file_provider = new Provider\FakeFileProvider(); } /** * @param Config $config * * @return \Psalm\Checker\ProjectChecker */ private function getProjectCheckerWithConfig(Config $config) { return new \Psalm\Checker\ProjectChecker( $config, new \Psalm\Provider\Providers( $this->file_provider, new Provider\FakeParserCacheProvider() ) ); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage UndefinedMethod * * @return void */ public function testStringCheckerPluginWithClassConstantConcat() { $this->project_checker = $this->getProjectCheckerWithConfig( TestConfig::loadFromXML( dirname(__DIR__) . DIRECTORY_SEPARATOR, ' ' ) ); $this->project_checker->config->initializePlugins($this->project_checker); $file_path = getcwd() . '/src/somefile.php'; $this->addFile( $file_path, ' \Psalm\Checker\ProjectChecker::class . "::foo", ]; }' ); $this->analyzeFile($file_path, new Context()); } }