GraphQL\Tests\Validator\NoFragmentCyclesTest::testNoSpreadingItselfDeeplyAndImmediately PHP Method

testNoSpreadingItselfDeeplyAndImmediately() public method

    public function testNoSpreadingItselfDeeplyAndImmediately()
    {
        $this->expectFailsRule(new NoFragmentCycles(), '
      fragment fragA on Dog { ...fragB }
      fragment fragB on Dog { ...fragB, ...fragC }
      fragment fragC on Dog { ...fragA, ...fragB }
    ', [FormattedError::create(NoFragmentCycles::cycleErrorMessage('fragB', []), [new SourceLocation(3, 31)]), FormattedError::create(NoFragmentCycles::cycleErrorMessage('fragA', ['fragB', 'fragC']), [new SourceLocation(2, 31), new SourceLocation(3, 41), new SourceLocation(4, 31)]), FormattedError::create(NoFragmentCycles::cycleErrorMessage('fragB', ['fragC']), [new SourceLocation(3, 41), new SourceLocation(4, 41)])]);
    }