GraphQL\Tests\Validator\DefaultValuesOfCorrectTypeTest::testVariablesWithInvalidDefaultNullValues PHP Method

testVariablesWithInvalidDefaultNullValues() public method

    public function testVariablesWithInvalidDefaultNullValues()
    {
        $this->expectFailsRule(new DefaultValuesOfCorrectType(), '
      query WithDefaultValues(
        $a: Int! = null,
        $b: String! = null,
        $c: ComplexInput = { requiredField: null, intField: null }
      ) {
        dog { name }
      }
        ', [$this->defaultForNonNullArg('a', 'Int!', 'Int', 3, 20), $this->badValue('a', 'Int!', 'null', 3, 20, ['Expected "Int!", found null.']), $this->defaultForNonNullArg('b', 'String!', 'String', 4, 23), $this->badValue('b', 'String!', 'null', 4, 23, ['Expected "String!", found null.']), $this->badValue('c', 'ComplexInput', '{requiredField: null, intField: null}', 5, 28, ['In field "requiredField": Expected "Boolean!", found null.'])]);
    }