- $this->assertTrue(implode(':', $this->langs) === implode(':', $configLocales), 'app.locales configuration variable matches found lang files');
+ $this->assertEquals(implode(':', $this->langs), implode(':', $appLocales), 'app.locales configuration variable does not match those found in lang files');
+ }
+
+ // Not part of standard phpunit test runs since we sometimes expect non-added langs.
+ public function test_locales_all_have_language_dropdown_entry()
+ {
+ $this->markTestSkipped('Only used when checking language inclusion');
+
+ $dropdownLocales = array_keys(trans('settings.language_select', [], 'en'));
+ sort($dropdownLocales);
+ sort($this->langs);
+ $diffs = array_diff($this->langs, $dropdownLocales);
+ if (count($diffs) > 0) {
+ $diffText = implode(',', $diffs);
+ $warning = "Languages: {$diffText} found in files but not in language select dropdown.";
+ $this->fail($warning);
+ }
+ $this->assertTrue(true);