Skip to content

Commit 18b0a3d

Browse files
committed
Remove skipping of tests based on ICU data version whenever possible
Many tests being skipped based on the ICU data version don't actually need it. They might be testing code paths not relying on Intl, or not performing assertions on the values depending on the ICU data and so not dependant on the exact ICU version being used.
1 parent c13b529 commit 18b0a3d

File tree

4 files changed

+4
-29
lines changed

4 files changed

+4
-29
lines changed

Tests/Constraints/CountryValidatorTest.php

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

1818
class CountryValidatorTest extends AbstractConstraintValidatorTest
1919
{
20-
protected function setUp()
21-
{
22-
IntlTestHelper::requireFullIntl($this);
23-
24-
parent::setUp();
25-
}
26-
2720
protected function createValidator()
2821
{
2922
return new CountryValidator();

Tests/Constraints/CurrencyValidatorTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@
1717

1818
class CurrencyValidatorTest extends AbstractConstraintValidatorTest
1919
{
20-
protected function setUp()
21-
{
22-
IntlTestHelper::requireFullIntl($this);
23-
24-
parent::setUp();
25-
}
26-
2720
protected function createValidator()
2821
{
2922
return new CurrencyValidator();
@@ -66,6 +59,8 @@ public function testValidCurrencies($currency)
6659
**/
6760
public function testValidCurrenciesWithCountrySpecificLocale($currency)
6861
{
62+
IntlTestHelper::requireFullIntl($this);
63+
6964
\Locale::setDefault('en_GB');
7065

7166
$this->validator->validate($currency, new Currency());

Tests/Constraints/LanguageValidatorTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ protected function createValidator()
2222
return new LanguageValidator();
2323
}
2424

25-
protected function setUp()
26-
{
27-
IntlTestHelper::requireFullIntl($this);
28-
29-
parent::setUp();
30-
}
31-
3225
public function testNullIsValid()
3326
{
3427
$this->validator->validate(null, new Language());
@@ -96,6 +89,8 @@ public function getInvalidLanguages()
9689

9790
public function testValidateUsingCountrySpecificLocale()
9891
{
92+
IntlTestHelper::requireFullIntl($this);
93+
9994
\Locale::setDefault('fr_FR');
10095
$existingLanguage = 'en';
10196

Tests/Constraints/LocaleValidatorTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

14-
use Symfony\Component\Intl\Util\IntlTestHelper;
1514
use Symfony\Component\Validator\Constraints\Locale;
1615
use Symfony\Component\Validator\Constraints\LocaleValidator;
1716

@@ -22,13 +21,6 @@ protected function createValidator()
2221
return new LocaleValidator();
2322
}
2423

25-
protected function setUp()
26-
{
27-
IntlTestHelper::requireIntl($this);
28-
29-
parent::setUp();
30-
}
31-
3224
public function testNullIsValid()
3325
{
3426
$this->validator->validate(null, new Locale());

0 commit comments

Comments
 (0)