projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
8ee6bd6
)
fix test
author
Michael Wallner
<mike@php.net>
Wed, 13 Jan 2021 11:01:36 +0000
(12:01 +0100)
committer
Michael Wallner
<mike@php.net>
Wed, 13 Jan 2021 11:01:36 +0000
(12:01 +0100)
tests/client029.phpt
patch
|
blob
|
history
diff --git
a/tests/client029.phpt
b/tests/client029.phpt
index a95508c27bc47974817ffe5c4c68a28fa9e193f2..275ff0374e54b490a8000ef50b6f166e284f9dd3 100644
(file)
--- a/
tests/client029.phpt
+++ b/
tests/client029.phpt
@@
-1,13
+1,13
@@
--TEST--
client curl user handler
--SKIPIF--
--TEST--
client curl user handler
--SKIPIF--
-<?php
+<?php
include "skipif.inc";
skip_client_test();
_ext("event");
include "skipif.inc";
skip_client_test();
_ext("event");
-?>
+?>
--FILE--
--FILE--
-<?php
+<?php
echo "Test\n";
class UserHandler implements http\Client\Curl\User
echo "Test\n";
class UserHandler implements http\Client\Curl\User
@@
-23,11
+23,11
@@
class UserHandler implements http\Client\Curl\User
$this->evbase = $evbase;
$this->client = $client;
}
$this->evbase = $evbase;
$this->client = $client;
}
-
+
function init($run) {
$this->run = $run;
}
function init($run) {
$this->run = $run;
}
-
+
function timer(int $timeout_ms) {
echo "T";
if (isset($this->timeout)) {
function timer(int $timeout_ms) {
echo "T";
if (isset($this->timeout)) {
@@
-44,10
+44,10
@@
class UserHandler implements http\Client\Curl\User
$this->timeout->add($timeout_ms/1000);
}
}
$this->timeout->add($timeout_ms/1000);
}
}
-
+
function socket($socket, int $action) {
echo "S";
function socket($socket, int $action) {
echo "S";
-
+
switch ($action) {
case self::POLL_NONE:
break;
switch ($action) {
case self::POLL_NONE:
break;
@@
-58,7
+58,7
@@
class UserHandler implements http\Client\Curl\User
unset($this->ios[(int) $socket]);
}
break;
unset($this->ios[(int) $socket]);
}
break;
-
+
default:
$ev = 0;
if ($action & self::POLL_IN) {
default:
$ev = 0;
if ($action & self::POLL_IN) {
@@
-68,16
+68,16
@@
class UserHandler implements http\Client\Curl\User
$ev |= Event::WRITE;
}
if (isset($this->ios[(int) $socket])) {
$ev |= Event::WRITE;
}
if (isset($this->ios[(int) $socket])) {
- $this->ios[(int) $socket]->set($this->evbase,
+ $this->ios[(int) $socket]->set($this->evbase,
$socket, $ev, $this->onEvent($socket));
} else {
$socket, $ev, $this->onEvent($socket));
} else {
- $this->ios[(int) $socket] = new Event($this->evbase,
+ $this->ios[(int) $socket] = new Event($this->evbase,
$socket, $ev, $this->onEvent($socket));
}
break;
}
}
$socket, $ev, $this->onEvent($socket));
}
break;
}
}
-
+
function onEvent($socket) {
return function($watcher, $events) use($socket) {
$action = 0;
function onEvent($socket) {
return function($watcher, $events) use($socket) {
$action = 0;
@@
-95,15
+95,15
@@
class UserHandler implements http\Client\Curl\User
}
};
}
}
};
}
-
+
function once() {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
function once() {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
-
+
function wait(int $timeout_ms = null) {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
function wait(int $timeout_ms = null) {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
-
+
function send() {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
function send() {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
@@
-128,5
+128,5
@@
server("proxy.inc", function($port) {
===DONE===
--EXPECTREGEX--
Test
===DONE===
--EXPECTREGEX--
Test
-
T*
[ST]+U+T*int\(200\)
+[ST]+U+T*int\(200\)
===DONE===
===DONE===