public function testDisallowsDifferingSubfields()
{
$this->expectFailsRuleWithSchema($this->getTestSchema(), new OverlappingFieldsCanBeMerged(), '
{
someBox {
... on IntBox {
box: stringBox {
val: scalar
val: unrelatedField
}
}
... on StringBox {
box: stringBox {
val: scalar
}
}
}
}
', [FormattedError::create(OverlappingFieldsCanBeMerged::fieldsConflictMessage('val', 'scalar and unrelatedField are different fields'), [new SourceLocation(6, 17), new SourceLocation(7, 17)])]);
}