projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
87db981
)
fix tests with short_open_tags off
author
Michael Wallner
<mike@php.net>
Fri, 22 Nov 2013 09:26:12 +0000
(09:26 +0000)
committer
Michael Wallner
<mike@php.net>
Fri, 22 Nov 2013 09:26:12 +0000
(09:26 +0000)
tests/envrequestbody001.phpt
patch
|
blob
|
history
tests/envrequestbody002.phpt
patch
|
blob
|
history
tests/envrequestbody003.phpt
patch
|
blob
|
history
tests/envrequestheader001.phpt
patch
|
blob
|
history
tests/message002.phpt
patch
|
blob
|
history
tests/message003.phpt
patch
|
blob
|
history
tests/negotiate001.phpt
patch
|
blob
|
history
diff --git
a/tests/envrequestbody001.phpt
b/tests/envrequestbody001.phpt
index 23511861527ac405d79a1f5d393fae208f62b5b8..28f6a748fe6fb5520f28148055d58197337b5854 100644
(file)
--- a/
tests/envrequestbody001.phpt
+++ b/
tests/envrequestbody001.phpt
@@
-1,12
+1,12
@@
--TEST--
env request body
--SKIPIF--
--TEST--
env request body
--SKIPIF--
-<?
include "skipif.inc";
+<?
php include "skipif.inc"; ?>
--PUT--
Content-Type: skip/me
foo
--FILE--
--PUT--
Content-Type: skip/me
foo
--FILE--
-<?
+<?
php
var_dump((string) \http\Env::getRequestBody());
?>
DONE
var_dump((string) \http\Env::getRequestBody());
?>
DONE
diff --git
a/tests/envrequestbody002.phpt
b/tests/envrequestbody002.phpt
index ec7d2d5dbc89307981c65d9b9e89c909940e2c73..69c59884b6747ed91b9f8e781699f702a875b405 100644
(file)
--- a/
tests/envrequestbody002.phpt
+++ b/
tests/envrequestbody002.phpt
@@
-1,12
+1,12
@@
--TEST--
env request body
--SKIPIF--
--TEST--
env request body
--SKIPIF--
-<?
include "skipif.inc";
+<?
php include "skipif.inc"; ?>
--PUT--
Content-Type: application/x-www-form-urlencoded
foo=bar&baz=buh
--FILE--
--PUT--
Content-Type: application/x-www-form-urlencoded
foo=bar&baz=buh
--FILE--
-<?
+<?
php
var_dump($_POST);
?>
DONE
var_dump($_POST);
?>
DONE
diff --git
a/tests/envrequestbody003.phpt
b/tests/envrequestbody003.phpt
index a22dbbdb81ce3f54aef69b69db10339de57a7e46..1aeae79fb90d8a46cd3c8c6e997e047cc46692c1 100644
(file)
--- a/
tests/envrequestbody003.phpt
+++ b/
tests/envrequestbody003.phpt
@@
-1,7
+1,7
@@
--TEST--
env request body
--SKIPIF--
--TEST--
env request body
--SKIPIF--
-<?
include "skipif.inc";
+<?
php include "skipif.inc"; ?>
--PUT--
Content-Type: multipart/form-data;boundary=123
--123
--PUT--
Content-Type: multipart/form-data;boundary=123
--123
@@
-18,7
+18,7
@@
Content-Disposition: form-data; name="up"; filename="up.txt"
foo=bar&baz=buh
--123--
--FILE--
foo=bar&baz=buh
--123--
--FILE--
-<?
+<?
php
var_dump($_POST);
var_dump($_FILES);
?>
var_dump($_POST);
var_dump($_FILES);
?>
diff --git
a/tests/envrequestheader001.phpt
b/tests/envrequestheader001.phpt
index b259ea5683a7e1cb82182b1209cc0c5360fd023d..5ec5eb7373e4a5670c0091274038dbfad4247996 100644
(file)
--- a/
tests/envrequestheader001.phpt
+++ b/
tests/envrequestheader001.phpt
@@
-1,19
+1,20
@@
--TEST--
env request header
--SKIPIF--
--TEST--
env request header
--SKIPIF--
-<?
include "skipif.inc";
+<?
php include "skipif.inc"; ?>
--POST--
a=b
--ENV--
HTTP_HOST=foo.bar
HTTP_ACCEPT=*/*
--FILE--
--POST--
a=b
--ENV--
HTTP_HOST=foo.bar
HTTP_ACCEPT=*/*
--FILE--
-<?
+<?
php
var_dump(http\Env::getRequestHeader("nono"));
var_dump(http\Env::getRequestHeader("Host"));
var_dump(http\Env::getRequestHeader("content-type"));
var_dump(http\Env::getRequestHeader());
var_dump(http\Env::getRequestHeader("nono"));
var_dump(http\Env::getRequestHeader("Host"));
var_dump(http\Env::getRequestHeader("content-type"));
var_dump(http\Env::getRequestHeader());
+?>
--EXPECTF--
NULL
string(%d) "foo.bar"
--EXPECTF--
NULL
string(%d) "foo.bar"
diff --git
a/tests/message002.phpt
b/tests/message002.phpt
index 06d9e1b909d996db5fb18519e85a468b7f2d4284..f782f8f4f4d78fe360b42d444aa23c7a0b285c30 100644
(file)
--- a/
tests/message002.phpt
+++ b/
tests/message002.phpt
@@
-10,7
+10,7
@@
HTTP_X_TEST=test
--COOKIE--
foo=bar
--FILE--
--COOKIE--
foo=bar
--FILE--
-<?
+<?
php
echo "Test\n";
use http\env\Request as HttpEnvRequest;
echo "Test\n";
use http\env\Request as HttpEnvRequest;
@@
-27,8
+27,8
@@
var_dump((string)$m->getBody());
echo "stream\n";
var_dump(file_get_contents("php://input"));
echo "stream\n";
var_dump(file_get_contents("php://input"));
-
-echo "Done\n";
+?>
+Done
--EXPECTF--
Test
object(%s)#%d (12) {
--EXPECTF--
Test
object(%s)#%d (12) {
diff --git
a/tests/message003.phpt
b/tests/message003.phpt
index 69be990725030e3c7bdd411109eb5ec1a9b592ed..26c6bc16790d2d6a0ff25faee56301284a8e7745 100644
(file)
--- a/
tests/message003.phpt
+++ b/
tests/message003.phpt
@@
-1,9
+1,9
@@
--TEST--
multipart message
--SKIPIF--
--TEST--
multipart message
--SKIPIF--
-<?
include "skipif.inc";
+<?
php include "skipif.inc"; ?>
--FILE--
--FILE--
-<?
+<?
php
$m = new http\Message(fopen(__DIR__."/data/message_r_multipart_put.txt","rb"));
if ($m->isMultipart($boundary)) {
var_dump($boundary);
$m = new http\Message(fopen(__DIR__."/data/message_r_multipart_put.txt","rb"));
if ($m->isMultipart($boundary)) {
var_dump($boundary);
diff --git
a/tests/negotiate001.phpt
b/tests/negotiate001.phpt
index d384b87f06cb14da76e538e40f8d7669d6c99b90..f628cdf1d9944784da44594d282bd04857f3549a 100644
(file)
--- a/
tests/negotiate001.phpt
+++ b/
tests/negotiate001.phpt
@@
-52,7
+52,7
@@
echo "$ln: "; print_r($lnr);
CUSTOM
CUSTOM
-<?
+<?
php
$cc = http\Env::negotiate("a, a.b;q=0.9, c.d;q=0, *.* ; q=0.1",
array("a.x", "c.d", "c.e", "a.b"), ".", $ccr);
echo "$cc: "; print_r($ccr);
$cc = http\Env::negotiate("a, a.b;q=0.9, c.d;q=0, *.* ; q=0.1",
array("a.x", "c.d", "c.e", "a.b"), ".", $ccr);
echo "$cc: "; print_r($ccr);