From 59a1afd0b68f9028e98fe003d8673db1fcf45f1f Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 28 Dec 2005 22:34:18 +0000 Subject: [PATCH] - add test --- tests/HttpRequest_007.phpt | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/HttpRequest_007.phpt diff --git a/tests/HttpRequest_007.phpt b/tests/HttpRequest_007.phpt new file mode 100644 index 0000000..d8a7e66 --- /dev/null +++ b/tests/HttpRequest_007.phpt @@ -0,0 +1,43 @@ +--TEST-- +HttpRequest PUT +--SKIPIF-- + +--FILE-- +recordHistory = true; +$r->addHeaders(array('content-type' => 'text/plain')); +$r->setPutFile(__FILE__); +$r->send(); +var_dump($r->getRawRequestMessage()); +echo "Done\n"; +?> +--EXPECTF-- +%sTEST +string(467) "PUT /.print_request.php HTTP/1.1 +User-Agent: PECL::HTTP/0.21.0dev (PHP/5.1.2-dev) +Host: dev.iworks.at +Accept: */* +content-type: text/plain +Content-Length: 278 +Expect: 100-continue + +recordHistory = true; +$r->addHeaders(array('content-type' => 'text/plain')); +$r->setPutFile(__FILE__); +$r->send(); +var_dump($r->getRawRequestMessage()); +echo "Done\n"; +?> +" +Done + -- 2.30.2