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