Skip to content

Commit e413527

Browse files
committed
Test
1 parent 3e6b1e2 commit e413527

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

src/Formatting/Formatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function getMoneyAndLocale(array $arguments, int $moneyIndex = 0, int
4141
}
4242

4343
if(! ($locale = $arguments[$localeIndex] ?? null)) {
44-
$locale = locale_get_default();
44+
$locale = setlocale(LC_ALL, 0);
4545
}
4646

4747
return [$money, $locale];

tests/Unit/FormatsPricesTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@
1717

1818
it('formats Brick\\Money instances as localized strings using application locale', function() {
1919
setlocale(LC_ALL, 'en_US');
20-
locale_set_default('en_US');
2120

2221
$price = Price::USD(65550, 8)->setVat(21);
2322

2423
$fmt = new NumberFormatter('en_US', NumberFormatter::CURRENCY);
25-
dump('en_US');
26-
dump($fmt);
2724
expect(Price::format($price->exclusive()))->toBe($fmt->formatCurrency(5244.0, 'USD'));
2825
})->only();
2926

0 commit comments

Comments
 (0)