You are here

public function RouteTest::testRoute in GraphQL 8.3

Test if the schema is created properly.

File

modules/graphql_core/tests/src/Kernel/Routing/RouteTest.php, line 49

Class

RouteTest
Test plugin based schema generation.

Namespace

Drupal\Tests\graphql_core\Kernel\Routing

Code

public function testRoute() {
  $metadata = $this
    ->defaultCacheMetaData();
  $metadata
    ->addCacheTags([
    '4xx-response',
  ]);
  $this
    ->assertResults($this
    ->getQueryFromFile('routing.gql'), [], [
    'route' => [
      'path' => '/my/other/alias',
      'internal' => '/graphql/test/a',
      'alias' => '/my/other/alias',
    ],
    'denied' => NULL,
  ], $metadata);
}