Quantcast
Viewing all articles
Browse latest Browse all 293850

Do not use direct configuration changes in LanguageNegotiationSessionTest

Problem/Motivation

Drupal\Tests\language\Functional\LanguageNegotiationSessionTest uses direct configuration changes to set weights of negotiation methods, but this is not the proposed way to set the weight and let developer assume it is a good idea.

    $config->set('negotiation.language_interface.method_weights', [
      'language-user-admin' => -10,
      LanguageNegotiationUrl::METHOD_ID => -8,
      LanguageNegotiationSession::METHOD_ID => -6,
      'language-user' => -4,
      LanguageNegotiationBrowser::METHOD_ID => -2,
      LanguageNegotiationSelected::METHOD_ID => 12,
    ]);

Proposed resolution

Set the weight using the form.


Viewing all articles
Browse latest Browse all 293850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>