Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests Involving Decimal and Currency Separators #3815

Merged
merged 7 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update CsvNumberFormatLocaleTest.php
More future-proofing.
  • Loading branch information
oleibman authored Dec 9, 2023
commit 4bac7ee4f55011e673f6ff928a136a1df1504c40
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public function testNumberFormatNoConversion(mixed $expectedValue, string $expec
if (!$this->localeAdjusted) {
self::markTestSkipped('Unable to set locale for testing.');
}
$localeconv = localeconv();
self::assertSame(',', $localeconv['decimal_point'], 'unexpected change to German decimal separator');
self::assertSame('.', $localeconv['thousands_sep'], 'unexpected change to German thousands separator');

$spreadsheet = $this->csvReader->load($this->filename);
$worksheet = $spreadsheet->getActiveSheet();
Expand Down Expand Up @@ -101,6 +104,9 @@ public function testNumberValueConversion(mixed $expectedValue, string $cellAddr
if (!$this->localeAdjusted) {
self::markTestSkipped('Unable to set locale for testing.');
}
$localeconv = localeconv();
self::assertSame(',', $localeconv['decimal_point'], 'unexpected change to German decimal separator');
self::assertSame('.', $localeconv['thousands_sep'], 'unexpected change to German thousands separator');

$this->csvReader->castFormattedNumberToNumeric(true);
$spreadsheet = $this->csvReader->load($this->filename);
Expand Down