X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2FHttpRequestPool_005.phpt;h=4770fe779f6206a6526cbcfa172b51204d05f4d3;hb=6df516595ca42f9b2bdcbb52c863c430fae450d4;hp=79c3b0d59378c234f8db9db9fb75ae8df8578081;hpb=8543c31ed65fb9cd3d92a109172d24dcc7acf70a;p=m6w6%2Fext-http diff --git a/tests/HttpRequestPool_005.phpt b/tests/HttpRequestPool_005.phpt index 79c3b0d..4770fe7 100644 --- a/tests/HttpRequestPool_005.phpt +++ b/tests/HttpRequestPool_005.phpt @@ -3,7 +3,7 @@ HttpRequestPool exception --SKIPIF-- --FILE-- @@ -14,19 +14,33 @@ $p = new HttpRequestPool(new HttpRequest('http://_____')); try { $p->send(); } catch (HttpRequestPoolException $x) { - var_dump(count($x->exceptionStack)); + for ($i=0; $x; ++$i, $x = @$x->innerException) { + printf("%s%s: %s\n", str_repeat("\t", $i), get_class($x), $x->getMessage()); + } + var_dump($i); } $p = new HttpRequestPool(new HttpRequest('http://_____'), new HttpRequest('http://_____')); try { $p->send(); } catch (HttpRequestPoolException $x) { - var_dump(count($x->exceptionStack)); + for ($i=0; $x; ++$i, $x = @$x->innerException) { + printf("%s%s: %s\n", str_repeat("\t", $i), get_class($x), $x->getMessage()); + } + var_dump($i); } echo "Done\n"; ?> --EXPECTF-- -%sTEST -int(2) -int(4) +%aTEST +HttpRequestPoolException: Exception caused by 2 inner exception(s) + HttpInvalidParamException: Empty or too short HTTP message: '' + HttpRequestException: %souldn't resolve host name; %s (http://_____/) +int(3) +HttpRequestPoolException: Exception caused by 4 inner exception(s) + HttpInvalidParamException: Empty or too short HTTP message: '' + HttpRequestException: %souldn't resolve host name; %s (http://_____/) + HttpInvalidParamException: Empty or too short HTTP message: '' + HttpRequestException: %souldn't resolve host name; %s (http://_____/) +int(5) Done