ContextTest.php in GraphQL 8.3
File
modules/graphql_core/tests/src/Kernel/Context/ContextTest.php
View source
<?php
namespace Drupal\Tests\graphql_core\Kernel\Context;
use Drupal\Tests\graphql_core\Kernel\GraphQLCoreTestBase;
class ContextTest extends GraphQLCoreTestBase {
public static $modules = [
'graphql_context_test',
];
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);
}
}