create(ParserFactory::PREFER_PHP7); $config = new TestConfig(); } public function setUp() { FileChecker::clearCache(); } public function testByRefUseVar() { $stmts = self::$parser->parse('check(true, true, $context); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage InvalidScalarArgument */ public function testWrongArg() { $stmts = self::$parser->parse('check(true, true, $context); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage InvalidReturnType */ public function testNoReturn() { $stmts = self::$parser->parse('check(true, true, $context); } public function testInferredArg() { $stmts = self::$parser->parse('check(true, true, $context); } }