projects
/
m6w6
/
ext-raphf
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
JFC, fix the merge here, too
[m6w6/ext-raphf]
/
tests
/
http004.phpt
diff --git
a/tests/http004.phpt
b/tests/http004.phpt
index 0c47c7b67d1fd958a1baba769e09933fe79ff1c7..7077cbdb533c578a742c58ab24293a808756a05c 100644
(file)
--- a/
tests/http004.phpt
+++ b/
tests/http004.phpt
@@
-13,7
+13,8
@@
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");
$c2 = new http\Client("curl", "php.net:80");
$c = new http\Client("curl", "php.net:80");
$c2 = new http\Client("curl", "php.net:80");
@@
-22,21
+23,24
@@
do {
$c2->enqueue(new http\Client\Request("GET", "http://php.net"));
} while (count($c) < 3);
$c2->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)))));
raphf\clean_persistent_handles();
raphf\clean_persistent_handles();
-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) {
}
@@
-44,7
+48,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"]=>
@@
-66,7
+70,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"]=>
@@
-88,7
+92,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"]=>