X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flanguage%2Ftests%2Fsrc%2FFunctional%2FLanguageNegotiationInfoTest.php;fp=web%2Fcore%2Fmodules%2Flanguage%2Ftests%2Fsrc%2FFunctional%2FLanguageNegotiationInfoTest.php;h=c5e3c2c7b1e7010cd5ab4c83cce1a42c476da40e;hp=9133a125a2ebd14101fe26d0f867897e37c6ac0a;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php b/web/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php index 9133a125a..c5e3c2c7b 100644 --- a/web/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php +++ b/web/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php @@ -160,11 +160,7 @@ class LanguageNegotiationInfoTest extends BrowserTestBase { foreach ($this->languageManager()->getDefinedLanguageTypesInfo() as $type => $info) { if (!in_array($type, $configurable) && isset($info['fixed'])) { $negotiation = $this->config('language.types')->get('negotiation.' . $type . '.enabled'); - $equal = count($info['fixed']) == count($negotiation); - while ($equal && list($id) = each($negotiation)) { - list(, $info_id) = each($info['fixed']); - $equal = $info_id == $id; - } + $equal = array_keys($negotiation) === array_values($info['fixed']); $this->assertTrue($equal, format_string('language negotiation for %type is properly set up', ['%type' => $type])); } }