summaryrefslogtreecommitdiff
path: root/tests/it_url.t
diff options
context:
space:
mode:
authorChristian Schneider2009-08-12 13:47:13 +0000
committerChristian Schneider2009-08-12 13:47:13 +0000
commit5826f3d2d6748ecb257492b6d5ee78a524f28ea7 (patch)
treea6110693229f31da2e224880fb0a316871c83ad5 /tests/it_url.t
parent8ad04ba59d1a84514a5f9d7ad2482e649d44da00 (diff)
downloaditools-5826f3d2d6748ecb257492b6d5ee78a524f28ea7.tar.gz
itools-5826f3d2d6748ecb257492b6d5ee78a524f28ea7.tar.bz2
itools-5826f3d2d6748ecb257492b6d5ee78a524f28ea7.zip
Added tests for it_url::absolute()
Diffstat (limited to 'tests/it_url.t')
-rwxr-xr-xtests/it_url.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/it_url.t b/tests/it_url.t
index b04618d..1117aff 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -63,4 +63,26 @@ is(
'$url->path'
);
+$_SERVER['HTTP_HOST'] = "gna.ch";
+is(
+ it_url::absolute("/"),
+ 'http://gna.ch:/',
+ 'it_url::absolute basic',
+);
+
+$_SERVER['SERVER_PORT'] = 42;
+is(
+ it_url::absolute("/port"),
+ 'http://gna.ch:42/port',
+ 'it_url::absolute with non-standard port',
+);
+
+$_SERVER['HTTPS'] = true;
+$_SERVER['SERVER_PORT'] = 443;
+is(
+ it_url::absolute("/https"),
+ 'https://gna.ch/https',
+ 'it_url::absolute for https',
+);
+
?>