Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / language / tests / src / Functional / LanguageNegotiationInfoTest.php
index 9133a125a2ebd14101fe26d0f867897e37c6ac0a..c5e3c2c7b1e7010cd5ab4c83cce1a42c476da40e 100644 (file)
@@ -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]));
       }
     }