You are here

public function InvalidPayloadTest::testEmptyPayload in GraphQL 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/Framework/InvalidPayloadTest.php \Drupal\Tests\graphql\Kernel\Framework\InvalidPayloadTest::testEmptyPayload()

Tests the empty payload.

File

tests/src/Kernel/Framework/InvalidPayloadTest.php, line 33

Class

InvalidPayloadTest
Invalid payloads should not trigger a PHP error, but be handled as empty.

Namespace

Drupal\Tests\graphql\Kernel\Framework

Code

public function testEmptyPayload() : void {
  $request = Request::create('/graphql/test', 'POST', [], [], [], [], '{ invalid');
  $this->container
    ->get('http_kernel')
    ->handle($request);
}