Skip to content

Commit adf21b5

Browse files
committed
[Validator] Improved tests to use the IntlTestHelper class
1 parent 85a4be6 commit adf21b5

File tree

4 files changed

+9
-40
lines changed

4 files changed

+9
-40
lines changed

Tests/Constraints/CountryValidatorTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@
1111

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

14+
use Symfony\Component\Intl\Util\IntlTestHelper;
1415
use Symfony\Component\Validator\Constraints\Country;
1516
use Symfony\Component\Validator\Constraints\CountryValidator;
1617

17-
class CountryValidatorTest extends LocalizedTestCase
18+
class CountryValidatorTest extends \PHPUnit_Framework_TestCase
1819
{
1920
protected $context;
2021
protected $validator;
2122

2223
protected function setUp()
2324
{
24-
parent::setUp();
25+
IntlTestHelper::requireIntl($this);
2526

2627
$this->context = $this->getMock('Symfony\Component\Validator\ExecutionContext', array(), array(), '', false);
2728
$this->validator = new CountryValidator();

Tests/Constraints/LanguageValidatorTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@
1111

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

14+
use Symfony\Component\Intl\Util\IntlTestHelper;
1415
use Symfony\Component\Validator\Constraints\Language;
1516
use Symfony\Component\Validator\Constraints\LanguageValidator;
1617

17-
class LanguageValidatorTest extends LocalizedTestCase
18+
class LanguageValidatorTest extends \PHPUnit_Framework_TestCase
1819
{
1920
protected $context;
2021
protected $validator;
2122

2223
protected function setUp()
2324
{
24-
parent::setUp();
25+
IntlTestHelper::requireIntl($this);
2526

2627
$this->context = $this->getMock('Symfony\Component\Validator\ExecutionContext', array(), array(), '', false);
2728
$this->validator = new LanguageValidator();

Tests/Constraints/LocaleValidatorTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@
1111

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

14+
use Symfony\Component\Intl\Util\IntlTestHelper;
1415
use Symfony\Component\Validator\Constraints\Locale;
1516
use Symfony\Component\Validator\Constraints\LocaleValidator;
1617

17-
class LocaleValidatorTest extends LocalizedTestCase
18+
class LocaleValidatorTest extends \PHPUnit_Framework_TestCase
1819
{
1920
protected $context;
2021
protected $validator;
2122

2223
protected function setUp()
2324
{
24-
parent::setUp();
25+
IntlTestHelper::requireIntl($this);
2526

2627
$this->context = $this->getMock('Symfony\Component\Validator\ExecutionContext', array(), array(), '', false);
2728
$this->validator = new LocaleValidator();

Tests/Constraints/LocalizedTestCase.php

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)