GraphQL\Tests\Validator\NoUndefinedVariablesTest::testMultipleUndefinedVariablesProduceMultipleErrors PHP Метод

testMultipleUndefinedVariablesProduceMultipleErrors() публичный Метод

    public function testMultipleUndefinedVariablesProduceMultipleErrors()
    {
        $this->expectFailsRule(new NoUndefinedVariables(), '
      query Foo($b: String) {
        ...FragAB
      }
      query Bar($a: String) {
        ...FragAB
      }
      fragment FragAB on Type {
        field1(a: $a, b: $b)
        ...FragC
        field3(a: $a, b: $b)
      }
      fragment FragC on Type {
        field2(c: $c)
      }
    ', [$this->undefVar('a', 9, 19, 'Foo', 2, 7), $this->undefVar('a', 11, 19, 'Foo', 2, 7), $this->undefVar('c', 14, 19, 'Foo', 2, 7), $this->undefVar('b', 9, 26, 'Bar', 5, 7), $this->undefVar('b', 11, 26, 'Bar', 5, 7), $this->undefVar('c', 14, 19, 'Bar', 5, 7)]);
    }