- fix win32 build, really, for now
[m6w6/ext-http] / tests / HttpRequest_009.phpt
1 --TEST--
2 HttpRequest callbacks
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkcls('HttpRequest');
7 ?>
8 --FILE--
9 <?php
10 echo "-TEST\n";
11
12 class _R extends HttpRequest
13 {
14 function onProgress($progress)
15 {
16 print_r($progress);
17 }
18
19 function onFinish()
20 {
21 var_dump($this->getResponseCode());
22 }
23 }
24
25 $r = new _R('http://dev.iworks.at/.print_request.php', HTTP_METH_POST);
26 $r->addPostFile('upload', __FILE__, 'text/plain');
27 $r->send();
28
29 echo "Done\n";
30 ?>
31 --EXPECTF--
32 %sTEST
33 Array
34 (
35 [dltotal] => %f
36 [dlnow] => %f
37 [ultotal] => %f
38 [ulnow] => %f
39 )
40 %srray
41 (
42 [dltotal] => %f
43 [dlnow] => %f
44 [ultotal] => %f
45 [ulnow] => %f
46 )
47 int(200)
48 Done