More Accurate Handling of Countries in validLocaleLanguages

This is a theoretical problem. Building FalseTrueArray only looks at languages, not countries. The only example we have is `pt` vs `pt_br`, and since True and False have the same translation for both locales, there is no problem. This PR will help it from becoming a problem in future if a new language/country combo is added.
This commit is contained in:
oleibman
2025-09-01 18:37:48 -07:00
parent 2803d96129
commit a88993dcc8
4 changed files with 45 additions and 0 deletions
@@ -124,10 +124,23 @@ class CalculationCoverageTest extends TestCase
$spreadsheet->disconnectWorksheets();
}
protected static int $winMinPhpToSkip = 80300;
protected static int $winMaxPhpToSkip = 80499;
protected static string $winIndicator = 'WIN';
// separate process because it sets its own handler
#[Attributes\RunInSeparateProcess]
public function testExceptionHandler(): void
{
if (
strtoupper(substr(PHP_OS, 0, 3)) === self::$winIndicator
&& PHP_VERSION_ID >= self::$winMinPhpToSkip
&& PHP_VERSION_ID <= self::$winMaxPhpToSkip
) {
self::markTestSkipped('Mysterious problem on Windows with Php8.3/4 only');
}
$this->expectException(CalcException::class);
$this->expectExceptionMessage('hello');
$handler = new ExceptionHandler();