Do not use direct configuration changes in LanguageNegotiationSessionTest

Created on 5 April 2023, almost 2 years ago
Updated 27 April 2023, over 1 year ago

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.

πŸ› Bug report
Status

Fixed

Version

9.5

Component
Language systemΒ  β†’

Last updated about 4 hours ago

  • Maintained by
  • πŸ‡©πŸ‡ͺGermany @sun
Created by

πŸ‡©πŸ‡ͺGermany sleitner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024