create(ParserFactory::PREFER_PHP7); self::$config = new TestConfig(); } /** * @return void */ public function setUp() { FileChecker::clearCache(); $this->project_checker = new \Psalm\Checker\ProjectChecker(); $this->project_checker->setConfig(self::$config); } /** * @return void */ public function testBasicRequire() { $this->project_checker->registerFile( getcwd() . DIRECTORY_SEPARATOR . 'file1.php', 'project_checker, self::$parser->parse('visitAndAnalyzeMethods(); } /** * @return void */ public function testNestedRequire() { $this->project_checker->registerFile( getcwd() . DIRECTORY_SEPARATOR . 'file1.php', 'project_checker->registerFile( getcwd() . DIRECTORY_SEPARATOR . 'file2.php', 'project_checker, self::$parser->parse('fooFoo(); } } ') ); $file2_checker->visitAndAnalyzeMethods(); } /** * @return void */ public function testRequireNamespace() { $this->project_checker->registerFile( getcwd() . DIRECTORY_SEPARATOR . 'file1.php', 'project_checker, self::$parser->parse('visitAndAnalyzeMethods(); } /** * @return void */ public function testRequireFunction() { $this->project_checker->registerFile( getcwd() . DIRECTORY_SEPARATOR . 'file1.php', 'project_checker, self::$parser->parse('visitAndAnalyzeMethods(); } /** * @return void */ public function testRequireNamespaceWithUse() { $this->project_checker->registerFile( getcwd() . DIRECTORY_SEPARATOR . 'file1.php', 'project_checker, self::$parser->parse('visitAndAnalyzeMethods(); } }