182f662e6849f6958b5e9c27516ea9d75b77a664
[m6w6/ext-http] / tests / HttpRequestPool_005.phpt
1 --TEST--
2 HttpRequestPool exception
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkmin(5);
7 checkcls('HttpRequestPool');
8 ?>
9 --FILE--
10 <?php
11 echo "-TEST\n";
12
13 $p = new HttpRequestPool(new HttpRequest('http://_____'));
14 try {
15 $p->send();
16 } catch (HttpRequestPoolException $x) {
17 var_dump(count($x->exceptionStack));
18 }
19 $p = new HttpRequestPool(new HttpRequest('http://_____'), new HttpRequest('http://_____'));
20 try {
21 $p->send();
22 } catch (HttpRequestPoolException $x) {
23 var_dump(count($x->exceptionStack));
24 }
25
26 try {
27 $p = new HttpRequestPool(new HttpRequest);
28 } catch (HttpRequestPoolException $x) {
29 var_dump(count($x->exceptionStack));
30 }
31
32 try {
33 $p = new HttpRequestPool(new HttpRequest, new HttpRequest);
34 } catch (HttpRequestPoolException $x) {
35 var_dump(count($x->exceptionStack));
36 }
37
38 echo "Done\n";
39 ?>
40 --EXPECTF--
41 %sTEST
42 int(1)
43 int(2)
44 int(1)
45 int(2)
46 Done
47