From 5826f3d2d6748ecb257492b6d5ee78a524f28ea7 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 12 Aug 2009 13:47:13 +0000 Subject: Added tests for it_url::absolute() --- tests/it_url.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests') 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', +); + ?> -- cgit v1.2.3