PATH:
opt
/
alt
/
tests
/
alt-php52-pecl-http_1.7.6-1.el8
/
tests
--TEST-- negotiation --SKIPIF-- <?php include 'skip.inc'; checkmin("5.2.5"); ?> --ENV-- HTTP_ACCEPT=application/xml, application/xhtml+xml, text/html ; q = .8 HTTP_ACCEPT_LANGUAGE=de-AT,de-DE;q=0.8,en-GB;q=0.3,en-US;q=0.2 HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7 --FILE-- <?php echo "-TEST\n"; $langs = array( array('de', 'en', 'es'), ); $csets = array( array('utf-8', 'iso-8859-1'), ); $ctype = array( array('foo/bar', 'application/xhtml+xml', 'text/html') ); var_dump(http_negotiate_language($langs[0])); var_dump(http_negotiate_language($langs[0], $lresult)); var_dump(http_negotiate_charset($csets[0])); var_dump(http_negotiate_charset($csets[0], $cresult)); var_dump(http_negotiate_content_type($ctype[0])); var_dump(http_negotiate_content_type($ctype[0], $tresult)); var_dump(http_negotiate_language(array("unknown"))); var_dump(http_negotiate_charset(array("unknown"))); var_dump(http_negotiate_content_type(array("unknown"))); print_r($lresult); print_r($cresult); print_r($tresult); echo "Done\n"; ?> --EXPECTF-- %aTEST string(2) "de" string(2) "de" string(10) "iso-8859-1" string(10) "iso-8859-1" string(21) "application/xhtml+xml" string(21) "application/xhtml+xml" string(7) "unknown" string(7) "unknown" string(7) "unknown" Array ( [de] => 900 [en] => 0.27 ) Array ( [iso-8859-1] => 1000 [utf-8] => 0.7 ) Array ( [application/xhtml+xml] => 999 [text/html] => 0.8 ) Done
[-] match_request_header_001.phpt
[edit]
[-] persistent_handles_003.phpt
[edit]
[-] chunked_decode_001.phpt
[edit]
[-] send_file_011.phpt
[edit]
[-] redirect_011.phpt
[edit]
[-] HttpRequestPool_005.phpt
[edit]
[-] cloning_001.phpt
[edit]
[-] redirect_011_logging.phpt
[edit]
[-] etag_mode_043.phpt
[edit]
[-] encoding_objects_001.phpt
[edit]
[-] send_data_005.phpt
[edit]
[-] parse_params_001.phpt
[edit]
[-] negotiation_001.phpt
[edit]
[-] build_str_001.phpt
[edit]
[-] date_002.phpt
[edit]
[-] send_file_012.phpt
[edit]
[-] HttpMessage_007.phpt
[edit]
[-] send_file_010.phpt
[edit]
[-] parse_message_004.phpt
[edit]
[-] chunked_decode_004.phpt
[edit]
[-] parse_headers_001.phpt
[edit]
[-] redirect_013_logging.phpt
[edit]
[-] parse_message_006.phpt
[edit]
[-] urls.txt
[edit]
[-] HttpResponse_003.phpt
[edit]
[-] request_methods.phpt
[edit]
[-] HttpMessage_001.phpt
[edit]
[-] etag_mode_033.phpt
[edit]
[-] etag_mode_041.phpt
[edit]
[-] send_ifrange_001.phpt
[edit]
[-] build_url_003.phpt
[edit]
[-] send_data_003.phpt
[edit]
[-] build_url_004.phpt
[edit]
[-] HttpResponse_004.phpt
[edit]
[-] parse_message_003.phpt
[edit]
[-] HttpRequest_005.phpt
[edit]
[-] data.txt
[edit]
[-] parse_cookie_001.phpt
[edit]
[-] ob_deflatehandler_001.phpt
[edit]
[-] etag_mode_042.phpt
[edit]
[-] send_ifrange_003.phpt
[edit]
[-] send_data_011.phpt
[edit]
[-] HttpMessage_008.phpt
[edit]
[-] date_001.phpt
[edit]
[-] bug_15800.phpt
[edit]
[-] parse_cookie_002.phpt
[edit]
[-] HttpResponse_001.phpt
[edit]
[-] HttpRequestPool_004.phpt
[edit]
[-] parse_message_002.phpt
[edit]
[-] HttpMessage_005.phpt
[edit]
[-] send_data_004.phpt
[edit]
[-] persistent_handles_001.phpt
[edit]
[-] HttpRequest_006.phpt
[edit]
[-] redirect_013.phpt
[edit]
[-] build_url_002.phpt
[edit]
[-] allowed_methods_002_logging.phpt
[edit]
[-] chunked_decode_003.phpt
[edit]
[-] send_data_010.phpt
[edit]
[-] exceptions.phpt
[edit]
[-] HttpMessage_006.phpt
[edit]
[-] HttpResponse_002.phpt
[edit]
[-] etag_mode_032.phpt
[edit]
[-] get_request_data_001.phpt
[edit]
[-] send_file_009.phpt
[edit]
[-] redirect_012_logging.phpt
[edit]
[-] HttpResponse_005.phpt
[edit]
[-] ob_inflatehandler_001.phpt
[edit]
[-] encodings.phpt
[edit]
[-] HttpRequest_001.phpt
[edit]
[-] parse_message_005.phpt
[edit]
[-] persistent_handles_002.phpt
[edit]
[-] etag_mode_044.phpt
[edit]
[-] skip.inc
[edit]
[-] stream_filters_003.phpt
[edit]
[-] etag_mode_034.phpt
[edit]
[-] HttpMessage_002.phpt
[edit]
[-] stream_filters_002.phpt
[edit]
[-] send_data_002.phpt
[edit]
[-] redirect_012.phpt
[edit]
[-] HttpRequestPool_006.phpt
[edit]
[+]
..
[-] log.inc
[edit]
[-] send_file_013.phpt
[edit]
[-] HttpMessage_004.phpt
[edit]
[-] send_data_001.phpt
[edit]
[-] stream_filters_001.phpt
[edit]
[-] chunked_decode_002.phpt
[edit]
[-] etag_mode_031.phpt
[edit]
[-] send_failed_precond_001.phpt
[edit]
[-] allowed_methods_002.phpt
[edit]
[-] send_data_006.phpt
[edit]
[-] HttpMessage_003.phpt
[edit]
[-] send_file_008.phpt
[edit]
[-] build_url_001.phpt
[edit]
[-] send_file_005.phpt
[edit]