unfold url tests
[m6w6/ext-http] / tests / client005.phpt
1 --TEST--
2 client response callback
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 skip_online_test();
7 ?>
8 --FILE--
9 <?php
10 echo "Test\n";
11
12 foreach (http\Client::getAvailableDrivers() as $driver) {
13 $client = new http\Client($driver);
14 $client->enqueue(new http\Client\Request("GET", "http://www.example.org"), function($response) {
15 echo "R\n";
16 if (!($response instanceof http\Client\Response)) {
17 var_dump($response);
18 }
19 });
20 $client->send();
21 }
22
23 ?>
24 Done
25 --EXPECTREGEX--
26 Test
27 (?:R
28 )+Done