You are here

public function ContextTest::testSimpleContext in GraphQL 8.3

Test if the schema is created properly.

File

modules/graphql_core/tests/src/Kernel/Context/ContextTest.php, line 21

Class

ContextTest
Test plugin based schema generation.

Namespace

Drupal\Tests\graphql_core\Kernel\Context

Code

public function testSimpleContext() {
  $query = $this
    ->getQueryFromFile('context.gql');
  $metadata = $this
    ->defaultCacheMetaData();
  $this
    ->assertResults($query, [], [
    'a' => [
      'name' => 'graphql_context_test.a',
    ],
    'b' => [
      'name' => 'graphql_context_test.b',
    ],
  ], $metadata);
}