Skip to content

Commit

Permalink
tests: mark test as skippable if locale is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris8934 committed Jan 26, 2024
1 parent ea34d25 commit 5d1f742
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/MoneyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public function itMultipliesTheAmount(int|string $multiplier, int $roundingMode,
*/
public function itMultipliesTheAmountWithLocaleThatUsesCommaSeparator(): void
{
$this->setLocale(LC_ALL, 'es_ES.utf8');
try {
$this->setLocale(LC_ALL, 'es_ES.utf8');
} catch (\Throwable) {
$this->markTestSkipped('The locale es_ES.utf8 is not available.');
}

$money = new Money(100, new Currency(self::CURRENCY));
$money = $money->multiply('0.1');
Expand Down

0 comments on commit 5d1f742

Please sign in to comment.