I tried running the LanguageSwitchingTest test on local using command vendor/bin/phpunit modules/language/tests/src/Functional/LanguageSwitchingTest.php but couldn't get the error as indicated in the test failure for patch added in #23 🐛 [regression] Language switcher block returns links to node on the frontpage Fixed . Instead I am getting 1 failure as follows with Drupal 9.5.7, PHP 8.1.18 & MYSQL 5.7.41:
1) Drupal\Tests\language\Functional\LanguageSwitchingTest::testLanguageBlock
The language links labels are in their own language on the language switcher block.
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
Array &0 (
0 => 'English'
- 1 => 'français'
+ 1 => 'français'
)/opt/drupal/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/opt/drupal/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79
/opt/drupal/web/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php:161
/opt/drupal/web/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php:86
/opt/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
Could someone help me with how to replicate this. However the functionality works fine with the patch.