Esempio n. 1
0
    /**
     * test getHttpCharset
     * expected true
     */
    public function testgetHttpCharset()
    {
        LocaleTestHelper::resetObject();
        putenv("HTTP_ACCEPT_CHARSET=");
        $value = new LocaleTestHelper();
        $list = $value->getHttpCharset();
        $this->assertTrue(empty($list));

        LocaleTestHelper::resetObject();
        putenv("HTTP_ACCEPT_CHARSET=,iso-8859-1, utf-8, utf-16, *;q=0.1");
        $value = new LocaleTestHelper();
        $list = $value->getHttpCharset();
        $this->assertTrue(isset($list['utf-8']));
    }