Fixed test cases failing when the Intl extension is not installed

This commit is contained in:
Bernhard Schussek 2014-05-21 13:33:13 +02:00
parent 8850274234
commit fad38e82f4
2 changed files with 8 additions and 0 deletions

View File

@ -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');

View File

@ -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');