file_provider = new Provider\FakeFileProvider(); $this->project_checker = new ProjectChecker( $this->file_provider, new Provider\FakeParserCacheProvider() ); $this->project_checker->setConfig(new TestConfig()); $this->project_checker->infer_types_from_usage = true; } /** * @return void */ public function tearDown() { $this->project_checker->classlike_storage_provider->deleteAll(); $this->project_checker->file_storage_provider->deleteAll(); } /** * @param string $file_path * @param string $contents * * @return void */ public function addFile($file_path, $contents) { $this->file_provider->registerFile($file_path, $contents); $this->project_checker->queueFileForScanning($file_path); } }