prepare v4.2.5
[m6w6/ext-http] / tests / urlparser006.phpt
index c35a20ff0404047d7fd9b664acf018e4a4b58fcc..1ef4c593feb5ab1e7704e6de687ab6c8c7138f94 100644 (file)
@@ -4,14 +4,16 @@ url parser multibyte/locale/idna
 <?php
 include "skipif.inc";
 if (!defined("http\\Url::PARSE_MBLOC") or
-       !defined("http\\Url::PARSE_IDN") or
-       !stristr(setlocale(LC_CTYPE, NULL), ".utf")) {
-       die("skip need http\\Url::PARSE_MBLOC|http\\Url::PARSE_IDN support and LC_CTYPE=*.UTF-8");
+       !defined("http\\Url::PARSE_TOIDN_2003") or
+       !utf8locale()) {
+       die("skip need http\\Url::PARSE_MBLOC|http\\Url::PARSE_TOIDN_2003 support and LC_CTYPE=*.UTF-8");
 }
 ?>
 --FILE--
 <?php
 echo "Test\n";
+include "skipif.inc";
+utf8locale();
 
 $urls = array(
        "s\xc3\xa7heme:",
@@ -21,7 +23,7 @@ $urls = array(
 
 foreach ($urls as $url) {
        printf("\n%s\n", $url);
-       var_dump(http\Url::parse($url, http\Url::PARSE_MBLOC|http\Url::PARSE_IDN));
+       var_dump(new http\Url($url, null, http\Url::PARSE_MBLOC|http\Url::PARSE_TOIDN_2003));
 }
 ?>
 DONE