travis: fix test
[m6w6/ext-http] / tests / client028.phpt
index 27ab2b646f37703f78ba9ed375726aab7f3bf2b6..e266243f758df14ac89682a117644ac74398e128 100644 (file)
@@ -13,19 +13,19 @@ class UserHandler implements http\Client\Curl\User
 {
        private $client;
        private $run;
-       private $fds = [
-                       "R" => [],
-                       "W" => []
-       ];
-       private $R = [];
-       private $W = [];
+       private $fds = array(
+                       "R" => array(),
+                       "W" => array()
+       );
+       private $R = array();
+       private $W = array();
        private $timeout = 1000;
        
        function __construct(http\Client $client) {
                $this->client = $client;
        }
        
-       function init(callable $run) {
+       function init($run) {
                $this->run = $run;
        }
        
@@ -124,9 +124,9 @@ include "helper/server.inc";
 
 server("proxy.inc", function($port) {
        $client = new http\Client;
-       $client->configure([
+       $client->configure(array(
                        "use_eventloop" => new UserHandler($client)
-       ]);
+       ));
        $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/"), function($r) {
                var_dump($r->getResponseCode());
        });
@@ -137,5 +137,5 @@ server("proxy.inc", function($port) {
 ===DONE===
 --EXPECTREGEX--
 Test
-T[WST]*(O[WST]*)+U+int\(200\)
-===DONE===
+[ST][WST]*([OWST]*)+U+int\(200\)
+O*===DONE===