Skip to content

Commit fad38e8

Browse files
committed
Fixed test cases failing when the Intl extension is not installed
1 parent 8850274 commit fad38e8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Translation\Tests;
1313

14+
use Symfony\Component\Intl\Util\IntlTestHelper;
1415
use Symfony\Component\Translation\IdentityTranslator;
1516
use Symfony\Component\Translation\MessageSelector;
1617

@@ -59,6 +60,9 @@ public function testGetSetLocale()
5960

6061
public function testGetLocaleReturnsDefaultLocaleIfNotSet()
6162
{
63+
// in order to test with "pt_BR"
64+
IntlTestHelper::requireFullIntl($this);
65+
6266
$translator = new IdentityTranslator(new MessageSelector());
6367

6468
\Locale::setDefault('en');

src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ public function getInvalidCountries()
107107

108108
public function testValidateUsingCountrySpecificLocale()
109109
{
110+
// in order to test with "en_GB"
111+
IntlTestHelper::requireFullIntl($this);
112+
110113
\Locale::setDefault('en_GB');
114+
111115
$existingCountry = 'GB';
112116
$this->context->expects($this->never())
113117
->method('addViolation');

0 commit comments

Comments
 (0)