'new_mapping[browser_langcode]' => 'fr',
'new_mapping[drupal_langcode]' => 'fr',
], 'Save configuration'
);
$this->
drupalGet('/admin/config/regional/language/detection/browser'
);
$this->
submitForm([ 'new_mapping[browser_langcode]' => 'en',
'new_mapping[drupal_langcode]' => 'en',
], 'Save configuration'
);
$this->
drupalGet('/admin/config/regional/language/detection/selected'
);
$this->
submitForm(['edit-selected-langcode' => 'en'
], 'Save configuration'
);
$this->
drupalLogout();
} /**
* Tests with browsers with and without Accept-Language header.
*/
public function testAcceptLanguageEmptyDefault() { // Check correct headers.
$this->
drupalGet('/en/system-test/echo/language test',
[],
['Accept-Language' => 'en'
]);
$this->
assertSession()->
responseHeaderEquals('Content-Language', 'en'
);
$this->
assertSession()->
responseHeaderEquals('X-Drupal-Cache', 'MISS'
);