public function testReportsDeepConflictToNearestCommonAncestor()
{
$this->expectFailsRule(new OverlappingFieldsCanBeMerged(), '
{
field {
deepField {
x: a
}
deepField {
x: b
}
},
field {
deepField {
y
}
}
}
', [FormattedError::create(OverlappingFieldsCanBeMerged::fieldsConflictMessage('deepField', [['x', 'a and b are different fields']]), [new SourceLocation(4, 11), new SourceLocation(5, 13), new SourceLocation(7, 11), new SourceLocation(8, 13)])]);
}