X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2FHttpRequest_007.phpt;h=f440c83d2776b7e6a7a7916bfeb7958edd9822c5;hb=378dd0f912b3139f1a797cf19e7c4eb88d33f141;hp=cf651be9ffa4e842b3176b37587dd05456bef12c;hpb=fa1a275e2b5e1b9dfb5bcbf97b51ef2b568e433c;p=m6w6%2Fext-http diff --git a/tests/HttpRequest_007.phpt b/tests/HttpRequest_007.phpt index cf651be..f440c83 100644 --- a/tests/HttpRequest_007.phpt +++ b/tests/HttpRequest_007.phpt @@ -9,35 +9,56 @@ checkcls('HttpRequest'); recordHistory = true; $r->addHeaders(array('content-type' => 'text/plain')); $r->setPutFile(__FILE__); $r->send(); -var_dump($r->getRawRequestMessage()); +var_dump($r->getHistory()->toString(true)); echo "Done\n"; ?> --EXPECTF-- %sTEST -string(%d) "PUT /.print_request.php HTTP/1.1 -User-Agent: %s +string(%d) "PUT /ext-http/.print_put.php5 HTTP/1.1 +User-Agent: PECL::HTTP/%s Host: dev.iworks.at Accept: */* -content-type: text/plain -Content-Length: 278 +Content-Type: text/plain +Content-Length: %d Expect: 100-continue recordHistory = true; $r->addHeaders(array('content-type' => 'text/plain')); $r->setPutFile(__FILE__); $r->send(); -var_dump($r->getRawRequestMessage()); +var_dump($r->getHistory()->toString(true)); echo "Done\n"; ?> + +HTTP/1.1 100 Continue +HTTP/1.1 200 OK +Date: %s +Server: %s +X-Powered-By: %s +Vary: Accept-Encoding +Content-Length: %d +Content-Type: text/html + +recordHistory = true; +$r->addHeaders(array('content-type' => 'text/plain')); +$r->setPutFile(__FILE__); +$r->send(); +var_dump($r->getHistory()->toString(true)); +echo "Done\n"; +?> + " Done -