lithium\tests\cases\g11n\LocaleTest::testLookup PHP Method

testLookup() public method

public testLookup ( )
    public function testLookup()
    {
        $result = Locale::lookup(array('zh_Hans_REVISED', 'zh_Hans_HK', 'zh', 'zh_Hans'), 'zh_Hans_HK_REVISED');
        $this->assertEqual('zh_Hans_HK', $result);
        $result = Locale::lookup(array('zh', 'zh_Hans_REVISED', 'zh_Hans_HK', 'zh_Hans'), 'zh_Hans_HK_REVISED');
        $this->assertEqual('zh_Hans_HK', $result);
        $result = Locale::lookup(array('en', 'en_UK', 'en_US', 'es', 'es_AR'), 'en');
        $this->assertEqual('en', $result);
        $result = Locale::lookup(array('en', 'en_UK', 'en_US', 'es', 'es_AR'), 'en_UK');
        $this->assertEqual('en_UK', $result);
        $result = Locale::lookup(array('en', 'en_UK', 'en_US', 'es', 'es_AR'), 'es_ES');
        $this->assertEqual('es', $result);
        $result = Locale::lookup(array('en', 'en_UK', 'en_US', 'es_AR'), 'es_ES');
        $this->assertEqual('es_AR', $result);
    }