diff --git a/src/Symfony/Component/Locale/Tests/LocaleTest.php b/src/Symfony/Component/Locale/Tests/LocaleTest.php index 71c5ba2da9..d11c826c48 100644 --- a/src/Symfony/Component/Locale/Tests/LocaleTest.php +++ b/src/Symfony/Component/Locale/Tests/LocaleTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Locale\Tests; use Symfony\Component\Intl\Intl; -use Symfony\Component\Intl\Tests\IntlTestCase; use Symfony\Component\Intl\Util\IcuVersion; +use Symfony\Component\Intl\Util\IntlTestHelper; use Symfony\Component\Locale\Locale; /** @@ -21,18 +21,12 @@ use Symfony\Component\Locale\Locale; * * @author Bernhard Schussek */ -class LocaleTest extends IntlTestCase +class LocaleTest extends \PHPUnit_Framework_TestCase { protected function setUp() { - // This class extends from \Ļocale, so we need the extension - if (!Intl::isExtensionLoaded()) { - $this->markTestSkipped('The intl extension is not available.'); - } - - Intl::setDataSource(Intl::STUB); - - Locale::setDefault('en'); + // Locale extends \Locale, so intl must be present + IntlTestHelper::requireIntl($this); } public function testGetDisplayCountries() diff --git a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php index aebd576838..7e5f64cf12 100644 --- a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php +++ b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php @@ -22,7 +22,10 @@ class StubLocaleTest extends \PHPUnit_Framework_TestCase { protected function setUp() { + // Force the use of stub data to have consistent results Intl::setDataSource(Intl::STUB); + + parent::setUp(); } public function testGetCurrenciesData()