From c55c4a26fe4feb5613a2a7c3f1ff0d242080be54 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Sat, 16 Mar 2013 00:25:10 +0100 Subject: [PATCH] [Intl] Only the StubNumberFormatterTest requires stub data --- src/Symfony/Component/Intl/Tests/IntlTestCase.php | 6 ------ .../Tests/NumberFormatter/StubNumberFormatterTest.php | 9 +++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Intl/Tests/IntlTestCase.php b/src/Symfony/Component/Intl/Tests/IntlTestCase.php index 3c1740aa22..fe16c9ff7c 100644 --- a/src/Symfony/Component/Intl/Tests/IntlTestCase.php +++ b/src/Symfony/Component/Intl/Tests/IntlTestCase.php @@ -22,12 +22,6 @@ use Symfony\Component\Intl\Util\Version; */ abstract class IntlTestCase extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - // Always use stub data for testing to have consistent results - Intl::setDataSource(Intl::STUB); - } - protected function is32Bit() { return PHP_INT_SIZE == 4; diff --git a/src/Symfony/Component/Intl/Tests/NumberFormatter/StubNumberFormatterTest.php b/src/Symfony/Component/Intl/Tests/NumberFormatter/StubNumberFormatterTest.php index 42b5a04a06..9841dfd2da 100644 --- a/src/Symfony/Component/Intl/Tests/NumberFormatter/StubNumberFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/NumberFormatter/StubNumberFormatterTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Intl\Tests\NumberFormatter; use Symfony\Component\Intl\Globals\StubIntlGlobals; +use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\NumberFormatter\StubNumberFormatter; /** @@ -20,6 +21,14 @@ use Symfony\Component\Intl\NumberFormatter\StubNumberFormatter; */ class StubNumberFormatterTest extends AbstractNumberFormatterTest { + protected function setUp() + { + // Force the use of stub data to have consistent results + Intl::setDataSource(Intl::STUB); + + parent::setUp(); + } + /** * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException */