Neos\Flow\Tests\Unit\I18n\LocaleTest::theConstructorRecognizesTheMostImportantValidLocaleIdentifiers PHP Method

theConstructorRecognizesTheMostImportantValidLocaleIdentifiers() public method

    public function theConstructorRecognizesTheMostImportantValidLocaleIdentifiers()
    {
        $locale = new I18n\Locale('de');
        $this->assertEquals('de', $locale->getLanguage());
        $this->assertNull($locale->getScript());
        $this->assertNull($locale->getRegion());
        $this->assertNull($locale->getVariant());
        $locale = new I18n\Locale('de_DE');
        $this->assertEquals('de', $locale->getLanguage());
        $this->assertEquals('DE', $locale->getRegion());
        $this->assertNull($locale->getScript());
        $this->assertNull($locale->getVariant());
        $locale = new I18n\Locale('en_Latn_US');
        $this->assertEquals('en', $locale->getLanguage());
        $this->assertEquals('Latn', $locale->getScript());
        $this->assertEquals('US', $locale->getRegion());
        $this->assertNull($locale->getVariant());
        $locale = new I18n\Locale('AR-arab_ae');
        $this->assertEquals('ar', $locale->getLanguage());
        $this->assertEquals('Arab', $locale->getScript());
        $this->assertEquals('AE', $locale->getRegion());
        $this->assertNull($locale->getVariant());
    }