setLocale($locale); self::assertSame($expectedResult, (string) $wizard); } public static function providerNumberLocale(): array { return [ ['#,##0.00', 'en-us'], ]; } public function testNumberLocaleInvalidFormat(): void { if (class_exists(NumberFormatter::class) === false) { self::markTestSkipped('Intl extension is not available'); } $locale = 'en-usa'; $this->expectException(Exception::class); $this->expectExceptionMessage("Invalid locale code '{$locale}'"); $wizard = new Number(2); $wizard->setLocale($locale); } }