Issue #3639317: Fixed PHPUnit failures on 3.6.x: 'InputBag' not available in Drupal 9.5 and random bundle IDs with digits breaking the menu links order

Fixes the two failing PHPUnit jobs of the scheduled pipelines on the 3.6.x branch (see #3639317).

Changes

  • AdminToolbarToolsFrontLinkTest (added in #3634150): replaced InputBag with ParameterBag for the _raw_variables request attribute. InputBag does not exist in Symfony 4.4 (Drupal 9.5), causing Class "Symfony\Component\HttpFoundation\InputBag" not found in the "phpunit (9.5.x)" job.
  • AdminToolbarToolsEntityCreationTrait: generate the random bundle IDs with letters only. The test sorts the IDs with sort(), while the menus are sorted with natural order (strnatcasecmp()), so IDs containing digits (e.g. f25zk6nm) randomly broke the expected links order in AdminToolbarToolsExtraLinksTest (seen in "phpunit (previous minor)").

Testing

  • The pipeline of this merge request passes, including the Drupal 9.5 and previous minor jobs.
  • Locally (Drupal 11.5): PHPCS passes, admin_toolbar_tools Kernel tests pass, AdminToolbarToolsExtraLinksTest passes on repeated runs.

This is a follow-up to MR !226 (merged) and commit:63f337df

Edited by David Suissa

Merge request reports

Loading
Loading