From: Michael Wallner Date: Wed, 9 Jul 2014 15:52:13 +0000 (+0200) Subject: Merge branch 'R_2_0' X-Git-Tag: RELEASE_2_1_0_RC1~30 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=9959c7864a5bcbe5e698f23f6cf51bf9abf06b7d Merge branch 'R_2_0' Conflicts: tests/params001.phpt tests/params003.phpt tests/params004.phpt tests/params005.phpt --- 9959c7864a5bcbe5e698f23f6cf51bf9abf06b7d diff --cc tests/params001.phpt index f696249,40b5e15..5b28dee --- a/tests/params001.phpt +++ b/tests/params001.phpt @@@ -26,9 -25,10 +26,10 @@@ var_dump $ct["text/json"]["arguments"]["charset"] ); -var_dump((string) $ct); +var_dump((string) $ct,$ct); - echo "Done\n"; + ?> + DONE --EXPECTF-- Test bool(true) @@@ -38,27 -38,4 +39,27 @@@ bool(false bool(true) string(10) "iso-8859-1" string(%d) "text/json;charset=iso-8859-1" +object(http\Params)#%d (5) { + ["params"]=> + array(1) { + ["text/json"]=> + array(2) { + ["value"]=> + bool(true) + ["arguments"]=> + array(1) { + ["charset"]=> + string(10) "iso-8859-1" + } + } + } + ["param_sep"]=> + string(1) "," + ["arg_sep"]=> + string(1) ";" + ["val_sep"]=> + string(1) "=" + ["flags"]=> + int(0) +} - Done + DONE diff --cc tests/params013.phpt index 0000000,0000000..d69782a new file mode 100644 --- /dev/null +++ b/tests/params013.phpt @@@ -1,0 -1,0 +1,79 @@@ ++--TEST-- ++header params rfc5987 ++--SKIPIF-- ++ ++--FILE-- ++params, (string) $p); ++$p = new http\Params("bar; title*=iso-8859-1'en'%A3%20rates"); ++var_dump($p->params, (string) $p); ++$p = new http\Params("bar; title*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates"); ++var_dump($p->params, (string) $p); ++ ++?> ++===DONE=== ++--EXPECT-- ++Test ++array(1) { ++ ["attachment"]=> ++ array(2) { ++ ["value"]=> ++ bool(true) ++ ["arguments"]=> ++ array(1) { ++ ["*rfc5987*"]=> ++ array(1) { ++ ["filename"]=> ++ array(1) { ++ [""]=> ++ string(10) "döner.pdf" ++ } ++ } ++ } ++ } ++} ++string(42) "attachment;filename*=utf-8''d%C3%B6ner.pdf" ++array(1) { ++ ["bar"]=> ++ array(2) { ++ ["value"]=> ++ bool(true) ++ ["arguments"]=> ++ array(1) { ++ ["*rfc5987*"]=> ++ array(1) { ++ ["title"]=> ++ array(1) { ++ ["en"]=> ++ string(8) "£ rates" ++ } ++ } ++ } ++ } ++} ++string(34) "bar;title*=utf-8'en'%C2%A3%20rates" ++array(1) { ++ ["bar"]=> ++ array(2) { ++ ["value"]=> ++ bool(true) ++ ["arguments"]=> ++ array(1) { ++ ["*rfc5987*"]=> ++ array(1) { ++ ["title"]=> ++ array(1) { ++ [""]=> ++ string(16) "£ and € rates" ++ } ++ } ++ } ++ } ++} ++string(50) "bar;title*=utf-8''%C2%A3%20and%20%E2%82%AC%20rates" ++===DONE=== diff --cc tests/params014.phpt index 0000000,0000000..b61953d new file mode 100644 --- /dev/null +++ b/tests/params014.phpt @@@ -1,0 -1,0 +1,70 @@@ ++--TEST-- ++header params rfc5987 ++--SKIPIF-- ++ ++--FILE-- ++params); ++var_dump((string)$p === $t, (string)$p, $t); ++?> ++===DONE=== ++--EXPECT-- ++Test ++array(3) { ++ ["p1"]=> ++ array(2) { ++ ["*rfc5987*"]=> ++ array(1) { ++ [""]=> ++ string(5) "süß" ++ } ++ ["arguments"]=> ++ array(0) { ++ } ++ } ++ ["p2"]=> ++ array(2) { ++ ["*rfc5987*"]=> ++ array(1) { ++ [""]=> ++ string(5) "heiß" ++ } ++ ["arguments"]=> ++ array(2) { ++ ["*rfc5987*"]=> ++ array(2) { ++ ["a1"]=> ++ array(1) { ++ [""]=> ++ string(3) "aß" ++ } ++ ["a2"]=> ++ array(1) { ++ [""]=> ++ string(3) "eß" ++ } ++ } ++ ["a3"]=> ++ string(2) "no" ++ } ++ } ++ ["p3"]=> ++ array(2) { ++ ["value"]=> ++ string(3) "not" ++ ["arguments"]=> ++ array(0) { ++ } ++ } ++} ++bool(true) ++string(96) "p1*=utf-8''s%C3%BC%C3%9F,p2*=utf-8''hei%C3%9F;a1*=utf-8''a%C3%9F;a2*=utf-8''e%C3%9F;a3=no,p3=not" ++string(96) "p1*=utf-8''s%C3%BC%C3%9F,p2*=utf-8''hei%C3%9F;a1*=utf-8''a%C3%9F;a2*=utf-8''e%C3%9F;a3=no,p3=not" ++===DONE=== diff --cc tests/params015.phpt index 0000000,0000000..ad3948c new file mode 100644 --- /dev/null +++ b/tests/params015.phpt @@@ -1,0 -1,0 +1,25 @@@ ++--TEST-- ++header params rfc5987 regression ++--SKIPIF-- ++ ++--FILE-- ++["filename"=>"foo.bar"]]); ++var_dump($p->params); ++var_dump((string)$p); ++?> ++===DONE=== ++--EXPECT-- ++Test ++array(1) { ++ ["attachment"]=> ++ array(1) { ++ ["filename"]=> ++ string(7) "foo.bar" ++ } ++} ++string(27) "attachment;filename=foo.bar" ++===DONE===