Fixed test cases failing when the Intl extension is not installed
This commit is contained in:
parent
8850274234
commit
fad38e82f4
|
@ -11,6 +11,7 @@
|
|||
|
||||
namespace Symfony\Component\Translation\Tests;
|
||||
|
||||
use Symfony\Component\Intl\Util\IntlTestHelper;
|
||||
use Symfony\Component\Translation\IdentityTranslator;
|
||||
use Symfony\Component\Translation\MessageSelector;
|
||||
|
||||
|
@ -59,6 +60,9 @@ class IdentityTranslatorTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testGetLocaleReturnsDefaultLocaleIfNotSet()
|
||||
{
|
||||
// in order to test with "pt_BR"
|
||||
IntlTestHelper::requireFullIntl($this);
|
||||
|
||||
$translator = new IdentityTranslator(new MessageSelector());
|
||||
|
||||
\Locale::setDefault('en');
|
||||
|
|
|
@ -107,7 +107,11 @@ class CountryValidatorTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testValidateUsingCountrySpecificLocale()
|
||||
{
|
||||
// in order to test with "en_GB"
|
||||
IntlTestHelper::requireFullIntl($this);
|
||||
|
||||
\Locale::setDefault('en_GB');
|
||||
|
||||
$existingCountry = 'GB';
|
||||
$this->context->expects($this->never())
|
||||
->method('addViolation');
|
||||
|
|
Reference in New Issue