X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fheader005.phpt;fp=tests%2Fheader005.phpt;h=07c27cb17a7bc0ac1ec1e7553054d26715643a40;hp=0000000000000000000000000000000000000000;hb=87db9817d428282792c8146d9c2ae9748ebf6f1e;hpb=7a5c865f6faf8b1b6c91735e9d3b040449ea74ba diff --git a/tests/header005.phpt b/tests/header005.phpt new file mode 100644 index 0000000..07c27cb --- /dev/null +++ b/tests/header005.phpt @@ -0,0 +1,32 @@ +--TEST-- +header negotiation +--SKIPIF-- + +--FILE-- +negotiate(array("text/plain","text/html"))); +var_dump("text/html" === $a->negotiate(array("text/plain","text/html"), $rs)); +var_dump(array("text/html"=>0.99, "text/plain"=>0.5) === $rs); +var_dump("text/plain" === $a->negotiate(array("foo/bar", "text/plain"), $rs)); +var_dump(array("text/plain"=>0.5) === $rs); +var_dump("foo/bar" === $a->negotiate(array("foo/bar"), $rs)); +var_dump(array() === $rs); + +?> +Done +--EXPECT-- +Test +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +Done