create(ParserFactory::PREFER_PHP7); } public function setUp() { $config = new TestConfig(); FileChecker::clearCache(); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage InvalidScalarArgument */ public function testInvalidScalarArgument() { $stmts = self::$parser->parse('check(true, true, $context); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage MixedArgument */ public function testMixedArgument() { Config::getInstance()->setCustomErrorLevel('MixedAssignment', Config::REPORT_SUPPRESS); $stmts = self::$parser->parse('check(true, true, $context); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage NullArgument */ public function testNullArgument() { $stmts = self::$parser->parse('check(true, true, $context); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage TooFewArguments */ public function testTooFewArguments() { $stmts = self::$parser->parse('check(true, true, $context); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage TooManyArguments */ public function testTooManyArguments() { $stmts = self::$parser->parse('check(true, true, $context); } /** * @expectedException \Psalm\Exception\CodeException * @expectedExceptionMessage TypeCoercion */ public function testTypeCoercion() { $stmts = self::$parser->parse('check(true, true, $context); } }