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

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

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