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