Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c55c4a2

Browse files
committed
[Intl] Only the StubNumberFormatterTest requires stub data
1 parent 17a480b commit c55c4a2

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/Symfony/Component/Intl/Tests/IntlTestCase.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
*/
2323
abstract class IntlTestCase extends \PHPUnit_Framework_TestCase
2424
{
25-
protected function setUp()
26-
{
27-
// Always use stub data for testing to have consistent results
28-
Intl::setDataSource(Intl::STUB);
29-
}
30-
3125
protected function is32Bit()
3226
{
3327
return PHP_INT_SIZE == 4;

src/Symfony/Component/Intl/Tests/NumberFormatter/StubNumberFormatterTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Intl\Tests\NumberFormatter;
1313

1414
use Symfony\Component\Intl\Globals\StubIntlGlobals;
15+
use Symfony\Component\Intl\Intl;
1516
use Symfony\Component\Intl\NumberFormatter\StubNumberFormatter;
1617

1718
/**
@@ -20,6 +21,14 @@
2021
*/
2122
class StubNumberFormatterTest extends AbstractNumberFormatterTest
2223
{
24+
protected function setUp()
25+
{
26+
// Force the use of stub data to have consistent results
27+
Intl::setDataSource(Intl::STUB);
28+
29+
parent::setUp();
30+
}
31+
2332
/**
2433
* @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException
2534
*/

0 commit comments

Comments
 (0)