[Intl] Only the StubNumberFormatterTest requires stub data

This commit is contained in:
Bernhard Schussek 2013-03-16 00:25:10 +01:00
parent 17a480b285
commit c55c4a26fe
2 changed files with 9 additions and 6 deletions

View File

@ -22,12 +22,6 @@ use Symfony\Component\Intl\Util\Version;
*/ */
abstract class IntlTestCase extends \PHPUnit_Framework_TestCase 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() protected function is32Bit()
{ {
return PHP_INT_SIZE == 4; return PHP_INT_SIZE == 4;

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Intl\Tests\NumberFormatter; namespace Symfony\Component\Intl\Tests\NumberFormatter;
use Symfony\Component\Intl\Globals\StubIntlGlobals; use Symfony\Component\Intl\Globals\StubIntlGlobals;
use Symfony\Component\Intl\Intl;
use Symfony\Component\Intl\NumberFormatter\StubNumberFormatter; use Symfony\Component\Intl\NumberFormatter\StubNumberFormatter;
/** /**
@ -20,6 +21,14 @@ use Symfony\Component\Intl\NumberFormatter\StubNumberFormatter;
*/ */
class StubNumberFormatterTest extends AbstractNumberFormatterTest 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 * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException
*/ */