File: test4a.phpt

package info (click to toggle)
php-http 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 100 kB
  • ctags: 58
  • sloc: php: 279; xml: 75; makefile: 54
file content (44 lines) | stat: -rw-r--r-- 1,486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--TEST--
absoluteURI() URL: https://example.org/subdir/test.php?abc=123
--GET--
--ENV--
HTTP_HOST=example.org
HTTPS=on
SERVER_NAME=example.org
QUERY_STRING=abc=123
SERVER_PORT=443
PATH_INFO=
REQUEST_URI=/subdir/test.php?abc=123
SCRIPT_NAME=/subdir/test.php
--FILE--
<?php
/**
 * This test checks that absoluteURI() still works with just a QUERY_STRING
 * passed to the script.
 *
 * Relative URLs are resolved to the current script
 *
 * PHP version 4 and 5
 *
 * @category HTTP
 * @package  HTTP
 * @author   Philippe Jausions <jausions@php.net>
 * @license  http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @link     http://pear.php.net/package/HTTP
 */
require 'absoluteURI.inc';

?>
--EXPECT--
||                   => https://example.org/subdir/test.php?abc=123
?new=value||         => https://example.org/subdir/test.php?new=value
#anchor||            => https://example.org/subdir/test.php?abc=123#anchor
/page.html||         => https://example.org/page.html
page.html||          => https://example.org/subdir/page.html
page.html|http|      => http://example.org/subdir/page.html
page.html|http|80    => http://example.org/subdir/page.html
page.html|http|8080  => http://example.org:8080/subdir/page.html
page.html|https|     => https://example.org/subdir/page.html
page.html|https|443  => https://example.org/subdir/page.html
page.html||8080      => https://example.org:8080/subdir/page.html
page.html|https|8888 => https://example.org:8888/subdir/page.html