if ($type ==
$test_type) { $this->
assertSession()->
fieldExists($form_field);
} else { $this->
assertSession()->
fieldNotExists($form_field);
} } // Check language negotiation results.
$this->
drupalGet(''
);
$last =
$this->container->
get('state'
)->
get('language_test.language_negotiation_last'
);
foreach ($this->
languageManager()->
getDefinedLanguageTypes() as $type) { $langcode =
$last[$type];
$value =
$type == LanguageInterface::TYPE_CONTENT ||
str_contains($type, 'test'
) ? 'it' : 'en';
$this->
assertEquals($langcode,
$value,
new FormattableMarkup('The negotiated language for %type is %language',
['%type' =>
$type, '%language' =>
$value]));
} // Uninstall language_test and check that everything is set back to the
// original status.
$this->container->
get('module_installer'
)->
uninstall(['language_test'
]);
$this->
rebuildContainer();
// Check that only the core language types are available.