projects
/
m6w6
/
ext-raphf
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
simplify test results
[m6w6/ext-raphf]
/
tests
/
http001.phpt
diff --git
a/tests/http001.phpt
b/tests/http001.phpt
index a28d8e1f3ed2f0a0c8a46558b842353715ff0784..e79f5b429756f5d9a34c2104d13ba681eb0314df 100644
(file)
--- a/
tests/http001.phpt
+++ b/
tests/http001.phpt
@@
-13,24
+13,27
@@
if (!class_exists("http\\Client", false)) {
<?php
echo "Test\n";
<?php
echo "Test\n";
-var_dump(raphf\stat_persistent_handles());
+$h = (array) raphf\stat_persistent_handles();
+var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h)))));
$c = new http\Client("curl", "php.net:80");
do {
$c->enqueue(new http\Client\Request("GET", "http://php.net"));
} while (count($c) < 3);
$c = new http\Client("curl", "php.net:80");
do {
$c->enqueue(new http\Client\Request("GET", "http://php.net"));
} while (count($c) < 3);
-var_dump(raphf\stat_persistent_handles());
+$h = (array) raphf\stat_persistent_handles();
+var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h)))));
unset($c);
unset($c);
-var_dump(raphf\stat_persistent_handles());
+$h = (array) raphf\stat_persistent_handles();
+var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h)))));
?>
Done
--EXPECTF--
Test
?>
Done
--EXPECTF--
Test
-
object(stdClass)#%d
(2) {
+
array
(2) {
["http\Client\Curl"]=>
array(0) {
}
["http\Client\Curl"]=>
array(0) {
}
@@
-38,7
+41,7
@@
object(stdClass)#%d (2) {
array(0) {
}
}
array(0) {
}
}
-
object(stdClass)#%d
(2) {
+
array
(2) {
["http\Client\Curl"]=>
array(1) {
["php.net:80"]=>
["http\Client\Curl"]=>
array(1) {
["php.net:80"]=>
@@
-60,7
+63,7
@@
object(stdClass)#%d (2) {
}
}
}
}
}
}
-
object(stdClass)#%d
(2) {
+
array
(2) {
["http\Client\Curl"]=>
array(1) {
["php.net:80"]=>
["http\Client\Curl"]=>
array(1) {
["php.net:80"]=>