GraphQL\Tests\Executor\NonNullTest::testNullsAComplexTreeOfNullableFieldsThatThrow PHP Метод

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

    public function testNullsAComplexTreeOfNullableFieldsThatThrow()
    {
        $doc = '
      query Q {
        nest {
          sync
          promise
          nest {
            sync
            promise
          }
          promiseNest {
            sync
            promise
          }
        }
        promiseNest {
          sync
          promise
          nest {
            sync
            promise
          }
          promiseNest {
            sync
            promise
          }
        }
      }
    ';
        $ast = Parser::parse($doc);
        $expected = ['data' => ['nest' => ['sync' => null, 'promise' => null, 'nest' => ['sync' => null, 'promise' => null], 'promiseNest' => ['sync' => null, 'promise' => null]], 'promiseNest' => ['sync' => null, 'promise' => null, 'nest' => ['sync' => null, 'promise' => null], 'promiseNest' => ['sync' => null, 'promise' => null]]], 'errors' => [FormattedError::create($this->syncError->getMessage(), [new SourceLocation(4, 11)]), FormattedError::create($this->promiseError->getMessage(), [new SourceLocation(5, 11)]), FormattedError::create($this->syncError->getMessage(), [new SourceLocation(7, 13)]), FormattedError::create($this->promiseError->getMessage(), [new SourceLocation(8, 13)]), FormattedError::create($this->syncError->getMessage(), [new SourceLocation(11, 13)]), FormattedError::create($this->promiseError->getMessage(), [new SourceLocation(12, 13)]), FormattedError::create($this->syncError->getMessage(), [new SourceLocation(16, 11)]), FormattedError::create($this->promiseError->getMessage(), [new SourceLocation(17, 11)]), FormattedError::create($this->syncError->getMessage(), [new SourceLocation(19, 13)]), FormattedError::create($this->promiseError->getMessage(), [new SourceLocation(20, 13)]), FormattedError::create($this->syncError->getMessage(), [new SourceLocation(23, 13)]), FormattedError::create($this->promiseError->getMessage(), [new SourceLocation(24, 13)])]];
        Executor::setPromiseAdapter(new ReactPromiseAdapter());
        $this->assertArraySubsetPromise($expected, Executor::execute($this->schema, $ast, $this->throwingData, null, [], 'Q'));
    }