Skip to content

Commit 1e3cec8

Browse files
committed
Fix remaining tests
1 parent d1392e3 commit 1e3cec8

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed

Tests/Constraints/CountryValidatorTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@
1818

1919
class CountryValidatorTest extends ConstraintValidatorTestCase
2020
{
21+
private $defaultLocale;
22+
23+
protected function setUp()
24+
{
25+
parent::setUp();
26+
27+
$this->defaultLocale = \Locale::getDefault();
28+
}
29+
30+
protected function tearDown()
31+
{
32+
parent::tearDown();
33+
34+
\Locale::setDefault($this->defaultLocale);
35+
}
36+
2137
protected function createValidator()
2238
{
2339
return new CountryValidator();

Tests/Constraints/CurrencyValidatorTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@
1818

1919
class CurrencyValidatorTest extends ConstraintValidatorTestCase
2020
{
21+
private $defaultLocale;
22+
23+
protected function setUp()
24+
{
25+
parent::setUp();
26+
27+
$this->defaultLocale = \Locale::getDefault();
28+
}
29+
30+
protected function tearDown()
31+
{
32+
parent::tearDown();
33+
34+
\Locale::setDefault($this->defaultLocale);
35+
}
36+
2137
protected function createValidator()
2238
{
2339
return new CurrencyValidator();

Tests/Constraints/LanguageValidatorTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@
1818

1919
class LanguageValidatorTest extends ConstraintValidatorTestCase
2020
{
21+
private $defaultLocale;
22+
23+
protected function setUp()
24+
{
25+
parent::setUp();
26+
27+
$this->defaultLocale = \Locale::getDefault();
28+
}
29+
30+
protected function tearDown()
31+
{
32+
parent::tearDown();
33+
34+
\Locale::setDefault($this->defaultLocale);
35+
}
36+
2137
protected function createValidator()
2238
{
2339
return new LanguageValidator();

Tests/Constraints/RangeValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getLessThanTen()
5050
[9.99999, '9.99999'],
5151
['9.99999', '"9.99999"'],
5252
[5, '5'],
53-
[1.0, '1.0'],
53+
[1.0, '1'],
5454
];
5555
}
5656

@@ -60,7 +60,7 @@ public function getMoreThanTwenty()
6060
[20.000001, '20.000001'],
6161
['20.000001', '"20.000001"'],
6262
[21, '21'],
63-
[30.0, '30.0'],
63+
[30.0, '30'],
6464
];
6565
}
6666

0 commit comments

Comments
 (0)