Fix integration tests when no locale with comma separator available
This commit is contained in:
parent
e61261fc74
commit
1b4827db01
@ -291,12 +291,17 @@ class WriterTest extends TestCase
|
||||
// Installed locales differ from one system to another, so we can't pick
|
||||
// a given locale.
|
||||
$supportedLocales = explode("\n", shell_exec('locale -a'));
|
||||
$foundCommaLocale = false;
|
||||
foreach ($supportedLocales as $supportedLocale) {
|
||||
\setlocale(LC_ALL, $supportedLocale);
|
||||
if (\localeconv()['decimal_point'] === ',') {
|
||||
$foundCommaLocale = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$foundCommaLocale) {
|
||||
$this->markTestSkipped('No locale with comma decimal separator');
|
||||
}
|
||||
$this->assertEquals(',', \localeconv()['decimal_point']);
|
||||
|
||||
$fileName = 'test_add_row_should_support_float_values_in_different_locale.xlsx';
|
||||
|
@ -406,12 +406,17 @@ class WriterTest extends TestCase
|
||||
// Installed locales differ from one system to another, so we can't pick
|
||||
// a given locale.
|
||||
$supportedLocales = explode("\n", shell_exec('locale -a'));
|
||||
$foundCommaLocale = false;
|
||||
foreach ($supportedLocales as $supportedLocale) {
|
||||
\setlocale(LC_ALL, $supportedLocale);
|
||||
if (\localeconv()['decimal_point'] === ',') {
|
||||
$foundCommaLocale = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$foundCommaLocale) {
|
||||
$this->markTestSkipped('No locale with comma decimal separator');
|
||||
}
|
||||
$this->assertEquals(',', \localeconv()['decimal_point']);
|
||||
|
||||
$fileName = 'test_add_row_should_support_float_values_in_different_locale.xlsx';
|
||||
|
Loading…
x
Reference in New Issue
Block a user