GraphQL\Tests\Validator\NoUnusedVariablesTest::testVariableNotUsedByFragmentUsedByOtherOperation PHP Метод

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

    public function testVariableNotUsedByFragmentUsedByOtherOperation()
    {
        $this->expectFailsRule(new NoUnusedVariables(), '
      query Foo($b: String) {
        ...FragA
      }
      query Bar($a: String) {
        ...FragB
      }
      fragment FragA on Type {
        field(a: $a)
      }
      fragment FragB on Type {
        field(b: $b)
      }
        ', [$this->unusedVar('b', 'Foo', 2, 17), $this->unusedVar('a', 'Bar', 5, 17)]);
    }