You are here

public function IdentityTranslatorTest::testGetLocaleReturnsDefaultLocaleIfNotSet in Plug 7

File

lib/Symfony/translation/Tests/IdentityTranslatorTest.php, line 60

Class

IdentityTranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testGetLocaleReturnsDefaultLocaleIfNotSet() {

  // in order to test with "pt_BR"
  IntlTestHelper::requireFullIntl($this);
  $translator = new IdentityTranslator();
  \Locale::setDefault('en');
  $this
    ->assertEquals('en', $translator
    ->getLocale());
  \Locale::setDefault('pt_BR');
  $this
    ->assertEquals('pt_BR', $translator
    ->getLocale());
}