You are here

public function LanguageContextTest::testRootLanguage in GraphQL 8.3

Test root language.

File

tests/src/Kernel/Framework/LanguageContextTest.php, line 145

Class

LanguageContextTest
Test contextual language negotiation.

Namespace

Drupal\Tests\graphql\Kernel\Framework

Code

public function testRootLanguage() {
  $query = <<<GQL
query {
  language
}
GQL;
  $this
    ->assertResults($query, [], [
    'language' => \Drupal::languageManager()
      ->getDefaultLanguage()
      ->getId(),
  ], $this
    ->defaultCacheMetaData());
}