public function LanguageContextTest::testOverriddenLanguage in GraphQL 8.3
Test overridden language.
File
- tests/
src/ Kernel/ Framework/ LanguageContextTest.php, line 204
Class
- LanguageContextTest
- Test contextual language negotiation.
Namespace
Drupal\Tests\graphql\Kernel\FrameworkCode
public function testOverriddenLanguage() {
$query = <<<GQL
query {
edge(language: "fr") {
language
edge(language: "en") {
language
}
}
}
GQL;
$this
->assertResults($query, [], [
'edge' => [
'language' => 'fr',
'edge' => [
'language' => 'en',
],
],
], $this
->defaultCacheMetaData());
}