Annotation of embedaddon/php/ext/session/tests/rfc1867.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: session rfc1867
! 3: --INI--
! 4: file_uploads=1
! 5: error_reporting=E_ALL&~E_NOTICE
! 6: comment=debug builds show some additional E_NOTICE errors
! 7: upload_max_filesize=1024
! 8: session.save_path=
! 9: session.name=PHPSESSID
! 10: session.use_cookies=1
! 11: session.use_only_cookies=0
! 12: session.upload_progress.enabled=1
! 13: session.upload_progress.cleanup=0
! 14: session.upload_progress.prefix=upload_progress_
! 15: session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
! 16: session.upload_progress.freq=1%
! 17: session.upload_progress.min_freq=0.000000001
! 18: --SKIPIF--
! 19: <?php include('skipif.inc'); ?>
! 20: --COOKIE--
! 21: PHPSESSID=rfc1867-tests
! 22: --GET--
! 23: PHPSESSID=rfc1867-tests-get
! 24: --POST_RAW--
! 25: Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
! 26: -----------------------------20896060251896012921717172737
! 27: Content-Disposition: form-data; name="PHPSESSID"
! 28:
! 29: rfc1867-tests-post
! 30: -----------------------------20896060251896012921717172737
! 31: Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
! 32:
! 33: rfc1867.php
! 34: -----------------------------20896060251896012921717172737
! 35: Content-Disposition: form-data; name="file1"; filename="file1.txt"
! 36:
! 37: 1
! 38: -----------------------------20896060251896012921717172737
! 39: Content-Disposition: form-data; name="file2"; filename="file2.txt"
! 40:
! 41: 2
! 42: -----------------------------20896060251896012921717172737--
! 43: --FILE--
! 44: <?php
! 45: session_start();
! 46: var_dump(session_id());
! 47: var_dump(basename(__FILE__) == $_POST[ini_get("session.upload_progress.name")]);
! 48: var_dump($_FILES);
! 49: var_dump($_SESSION["upload_progress_" . basename(__FILE__)]);
! 50: session_destroy();
! 51: ?>
! 52: --EXPECTF--
! 53: string(%d) "rfc1867-tests"
! 54: bool(true)
! 55: array(2) {
! 56: [%u|b%"file1"]=>
! 57: array(5) {
! 58: [%u|b%"name"]=>
! 59: %string|unicode%(9) "file1.txt"
! 60: [%u|b%"type"]=>
! 61: %string|unicode%(0) ""
! 62: [%u|b%"tmp_name"]=>
! 63: %string|unicode%(%d) "%s"
! 64: [%u|b%"error"]=>
! 65: int(0)
! 66: [%u|b%"size"]=>
! 67: int(1)
! 68: }
! 69: [%u|b%"file2"]=>
! 70: array(5) {
! 71: [%u|b%"name"]=>
! 72: %string|unicode%(9) "file2.txt"
! 73: [%u|b%"type"]=>
! 74: %string|unicode%(0) ""
! 75: [%u|b%"tmp_name"]=>
! 76: %string|unicode%(%d) "%s"
! 77: [%u|b%"error"]=>
! 78: int(0)
! 79: [%u|b%"size"]=>
! 80: int(1)
! 81: }
! 82: }
! 83: array(5) {
! 84: [%u|b%"start_time"]=>
! 85: int(%d)
! 86: [%u|b%"content_length"]=>
! 87: int(%d)
! 88: [%u|b%"bytes_processed"]=>
! 89: int(%d)
! 90: [%u|b%"done"]=>
! 91: bool(true)
! 92: [%u|b%"files"]=>
! 93: array(2) {
! 94: [0]=>
! 95: array(7) {
! 96: [%u|b%"field_name"]=>
! 97: %unicode|string%(5) "file1"
! 98: [%u|b%"name"]=>
! 99: %unicode|string%(9) "file1.txt"
! 100: [%u|b%"tmp_name"]=>
! 101: %unicode|string%(%d) "%s"
! 102: [%u|b%"error"]=>
! 103: int(0)
! 104: [%u|b%"done"]=>
! 105: bool(true)
! 106: [%u|b%"start_time"]=>
! 107: int(%d)
! 108: [%u|b%"bytes_processed"]=>
! 109: int(1)
! 110: }
! 111: [1]=>
! 112: array(7) {
! 113: [%u|b%"field_name"]=>
! 114: %unicode|string%(5) "file2"
! 115: [%u|b%"name"]=>
! 116: %unicode|string%(9) "file2.txt"
! 117: [%u|b%"tmp_name"]=>
! 118: %unicode|string%(%d) "%s"
! 119: [%u|b%"error"]=>
! 120: int(0)
! 121: [%u|b%"done"]=>
! 122: bool(true)
! 123: [%u|b%"start_time"]=>
! 124: int(%d)
! 125: [%u|b%"bytes_processed"]=>
! 126: int(1)
! 127: }
! 128: }
! 129: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>