create(ParserFactory::PREFER_PHP7); } /** * @return void */ public function setUp() { $config = new TestConfig(); $config->throw_exception = true; FileChecker::clearCache(); $this->project_checker = new \Psalm\Checker\ProjectChecker(); } /** * @return void */ public function testBasicRequire() { $this->project_checker->registerFile( getcwd() . '/file1.php', 'project_checker, self::$parser->parse('visitAndAnalyzeMethods(); } /** * @return void */ 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(); } /** * @return void */ public function testRequireNamespace() { $this->project_checker->registerFile( getcwd() . '/file1.php', 'project_checker, self::$parser->parse('visitAndAnalyzeMethods(); } /** * @return void */ public function testRequireFunction() { $this->project_checker->registerFile( getcwd() . '/file1.php', 'project_checker, self::$parser->parse('visitAndAnalyzeMethods(); } /** * @return void */ public function testRequireNamespaceWithUse() { $this->project_checker->registerFile( getcwd() . '/file1.php', 'project_checker, self::$parser->parse('visitAndAnalyzeMethods(); } }