$p = $f->createPool();
$s = $f->createDataShare();
+$r->setRequest(new http\Client\Request("GET", "http://localhost/"));
+$x = $f->createPool($r);
+$y = $f->createDatashare($r);
+
var_dump(
- array_map("get_class", array($f,$r,$p,$s)),
+ array_map("get_class", array($f,$r,$p,$s,$x,$y)),
$f->getDriver()
);
foreach (array("Client", "Pool", "DataShare") as $type) {
try {
- var_dump((new http\Client\Factory(array("driver" => "nonexistant")))->{"create$type"}());
+ $f = new http\Client\Factory(array("driver" => "nonexistant"));
+ var_dump($f->{"create$type"}());
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECTF--
Test
-array(4) {
+array(6) {
[0]=>
string(9) "MyFactory"
[1]=>
string(6) "MyPool"
[3]=>
string(7) "MyShare"
+ [4]=>
+ string(6) "MyPool"
+ [5]=>
+ string(7) "MyShare"
}
string(4) "curl"
clients are not supported by this driver