public function ResultTest::testBatchedQueries in GraphQL 8.4
Same name and namespace in other branches
- 8.3 tests/src/Kernel/Framework/ResultTest.php \Drupal\Tests\graphql\Kernel\Framework\ResultTest::testBatchedQueries()
Test a batched query result.
File
- tests/
src/ Kernel/ Framework/ ResultTest.php, line 51
Class
- ResultTest
- Test the whole query result pipeline.
Namespace
Drupal\Tests\graphql\Kernel\FrameworkCode
public function testBatchedQueries() : void {
$result = $this
->batchedQueries([
[
'query' => 'query { root } ',
],
[
'query' => 'query { root }',
],
]);
$this
->assertSame(200, $result
->getStatusCode());
$this
->assertSame([
[
'data' => [
'root' => 'test',
],
],
[
'data' => [
'root' => 'test',
],
],
], json_decode($result
->getContent(), TRUE));
}