diff --git a/tests/Calculator/LocaleAwareBcMathCalculatorTest.php b/tests/Calculator/LocaleAwareBcMathCalculatorTest.php index a31d4641..d0a57090 100644 --- a/tests/Calculator/LocaleAwareBcMathCalculatorTest.php +++ b/tests/Calculator/LocaleAwareBcMathCalculatorTest.php @@ -4,6 +4,8 @@ namespace Tests\Money\Calculator; +use function setlocale; + use const LC_ALL; /** @covers \Money\Calculator\BcMathCalculator */ @@ -13,6 +15,6 @@ public function setUp(): void { parent::setUp(); - $this->setLocale(LC_ALL, 'ru_RU.UTF-8'); + setlocale(LC_ALL, 'ru_RU.UTF-8'); } } diff --git a/tests/Calculator/LocaleAwareGmpCalculatorTest.php b/tests/Calculator/LocaleAwareGmpCalculatorTest.php index 19fff94d..aca32ab9 100644 --- a/tests/Calculator/LocaleAwareGmpCalculatorTest.php +++ b/tests/Calculator/LocaleAwareGmpCalculatorTest.php @@ -4,6 +4,8 @@ namespace Tests\Money\Calculator; +use function setlocale; + use const LC_ALL; /** @covers \Money\Calculator\GmpCalculator */ @@ -13,6 +15,6 @@ public function setUp(): void { parent::setUp(); - $this->setLocale(LC_ALL, 'ru_RU.UTF-8'); + setlocale(LC_ALL, 'ru_RU.UTF-8'); } } diff --git a/tests/ConverterTest.php b/tests/ConverterTest.php index 6dad6ca5..cab4134d 100644 --- a/tests/ConverterTest.php +++ b/tests/ConverterTest.php @@ -13,6 +13,7 @@ use Money\Money; use PHPUnit\Framework\TestCase; +use function setlocale; use function sprintf; use const LC_ALL; @@ -192,7 +193,7 @@ public function itConvertsToADifferentCurrencyWhenDecimalSeparatorIsComma( $amount, $expectedAmount ): void { - $this->setLocale(LC_ALL, 'ru_RU.UTF-8'); + setlocale(LC_ALL, 'ru_RU.UTF-8'); $this->itConvertsToADifferentCurrency( $baseCurrencyCode, diff --git a/tests/MoneyTest.php b/tests/MoneyTest.php index a6aeff39..a80ad7d8 100644 --- a/tests/MoneyTest.php +++ b/tests/MoneyTest.php @@ -10,6 +10,7 @@ use PHPUnit\Framework\TestCase; use function json_encode; +use function setlocale; use const LC_ALL; use const PHP_INT_MAX; @@ -99,7 +100,7 @@ public function itMultipliesTheAmount(int|string $multiplier, int $roundingMode, */ public function itMultipliesTheAmountWithLocaleThatUsesCommaSeparator(): void { - $this->setLocale(LC_ALL, 'es_ES.utf8'); + setlocale(LC_ALL, 'es_ES.utf8'); $money = new Money(100, new Currency(self::CURRENCY)); $money = $money->multiply('0.1');