make a language test base helper that makes a random langcode

Created on 13 September 2014, about 10 years ago
Updated 30 September 2024, about 2 months ago

Problem/Motivation

useful in issues like #2337859: LanguageUrlRewritingTest should not be setting the id of a language β†’

we dont really want a *random* id. Because we dont want to get "en", etc. (which might then cause random fails)

Proposed resolution

write a helper for a language test base that will exclude certain langcodes

Remaining tasks

User interface changes

No.

API changes

No.

πŸ“Œ Task
Status

Closed: works as designed

Version

11.0 πŸ”₯

Component

language system

Created by

πŸ‡ΊπŸ‡ΈUnited States yesct

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    I agree with #9. So, I looked at the existing usage of $this->randomMachineName(2) in core. There are only a few and none need to generate more than one langcode, which the patch allows for. So, it does look like core needs this. And combined with the fact that there has been no interest in this in 10 years, I am going to close this.

    If I did miss a case where this is useful, reopen and comment.

    Thanks

Production build 0.71.5 2024