You are here

public function FieldTest::testRootField in GraphQL 8.3

Test if the schema is created properly.

File

tests/src/Kernel/Extension/FieldTest.php, line 20

Class

FieldTest
Test plugin based schema generation.

Namespace

Drupal\Tests\graphql\Kernel\Extension

Code

public function testRootField() {
  $string = 'Hello Echo!';
  $query = $this
    ->getQueryFromFile('echo.gql');
  $this
    ->assertResults($query, [
    'input' => $string,
  ], [
    'echo' => $string,
  ], $this
    ->defaultCacheMetaData());
}