* adding tests
[m6w6/ext-http] / tests / 011_abs_uri.phpt
diff --git a/tests/011_abs_uri.phpt b/tests/011_abs_uri.phpt
new file mode 100644 (file)
index 0000000..fa4db1b
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+http_absolute_uri() with proto
+--SKIPIF--
+<?php 
+extension_loaded('http') or die('ext/http not available');
+strncasecmp(PHP_SAPI, 'CLI', 3) or die('cannot run tests with CLI');
+?>
+--FILE--
+<?php
+echo http_absolute_uri('sec', 'https'), "\n";
+echo http_absolute_uri('/pub', 'ftp'), "\n";
+echo http_absolute_uri('/', null), "\n";
+?>
+--EXPECTF--
+Content-type: text/html
+X-Powered-By: PHP/%s
+
+https://localhost/sec
+ftp://localhost/pub
+http://localhost/