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

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

    public function testDisallowsDifferingReturnTypeListDespiteNoOverlap()
    {
        $this->expectFailsRuleWithSchema($this->getTestSchema(), new OverlappingFieldsCanBeMerged(), '
        {
          someBox {
            ... on IntBox {
              box: listStringBox {
                scalar
              }
            }
            ... on StringBox {
              box: stringBox {
                scalar
              }
            }
          }
        }
        ', [FormattedError::create(OverlappingFieldsCanBeMerged::fieldsConflictMessage('box', 'they return conflicting types [StringBox] and StringBox'), [new SourceLocation(5, 15), new SourceLocation(10, 15)])]);
        $this->expectFailsRuleWithSchema($this->getTestSchema(), new OverlappingFieldsCanBeMerged(), '
        {
          someBox {
            ... on IntBox {
              box: stringBox {
                scalar
              }
            }
            ... on StringBox {
              box: listStringBox {
                scalar
              }
            }
          }
        }
        ', [FormattedError::create(OverlappingFieldsCanBeMerged::fieldsConflictMessage('box', 'they return conflicting types StringBox and [StringBox]'), [new SourceLocation(5, 15), new SourceLocation(10, 15)])]);
    }