GraphQL\Tests\Validator\OverlappingFieldsCanBeMergedTest::testReportsEachConflictOnce PHP Метод

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

    public function testReportsEachConflictOnce()
    {
        $this->expectFailsRule(new OverlappingFieldsCanBeMerged(), '
      {
        f1 {
          ...A
          ...B
        }
        f2 {
          ...B
          ...A
        }
        f3 {
          ...A
          ...B
          x: c
        }
      }
      fragment A on Type {
        x: a
      }
      fragment B on Type {
        x: b
      }
    ', [FormattedError::create(OverlappingFieldsCanBeMerged::fieldsConflictMessage('x', 'a and b are different fields'), [new SourceLocation(18, 9), new SourceLocation(21, 9)]), FormattedError::create(OverlappingFieldsCanBeMerged::fieldsConflictMessage('x', 'a and c are different fields'), [new SourceLocation(18, 9), new SourceLocation(14, 11)]), FormattedError::create(OverlappingFieldsCanBeMerged::fieldsConflictMessage('x', 'b and c are different fields'), [new SourceLocation(21, 9), new SourceLocation(14, 11)])]);
    }