Polyglot\Services\LangTest::testCanSetLocaleFromCurrent PHP Метод

testCanSetLocaleFromCurrent() публичный Метод

    public function testCanSetLocaleFromCurrent()
    {
        $this->translator->setLocale('en');
        $this->translator->setInternalLocale();
        $locale = $this->translator->getShortInternalLocale();
        $translatedString = strftime('%B', mktime(0, 0, 0, 1, 1, 2012));
        $matcher = strlen($locale) == 5 ? 'en_US' : 'C/en_US.UTF-8/C/C/C/C';
        $this->assertEquals($locale, $matcher);
        $this->assertEquals('January', $translatedString);
    }