summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnton Titov <[email protected]>2021-02-18 16:44:10 +0300
committerGitHub <[email protected]>2021-02-18 16:44:10 +0300
commit546b350a35b35af9eecb61aab5f7bcbbaffd449f (patch)
tree836548aafc26bbc02471f0f30ff86a29c2696338 /tests
parent29f0d9e0da51f8c98c8d01e260eccfacf1072c01 (diff)
fix(php): PHP tests to use latest signatures (#550)
Diffstat (limited to 'tests')
-rw-r--r--tests/broken.php2
-rw-r--r--tests/delay.php2
-rw-r--r--tests/echo.php2
-rw-r--r--tests/head.php2
-rw-r--r--tests/memleak.php2
-rw-r--r--tests/pid.php2
-rw-r--r--tests/plugins/server/socket.php2
-rw-r--r--tests/plugins/server/tcp.php2
-rw-r--r--tests/sleep.php2
-rw-r--r--tests/slow-pid.php2
-rw-r--r--tests/stop.php2
11 files changed, 11 insertions, 11 deletions
diff --git a/tests/broken.php b/tests/broken.php
index 1f869b2d..413f860f 100644
--- a/tests/broken.php
+++ b/tests/broken.php
@@ -10,5 +10,5 @@ $rr = new RoadRunner\Worker($relay);
while ($in = $rr->waitPayload()) {
echo undefined_function();
- $rr->send((string)$in->body, null);
+ $rr->respond(new RoadRunner\Payload((string)$in->body, null));
}
diff --git a/tests/delay.php b/tests/delay.php
index f0435b05..2c8255ba 100644
--- a/tests/delay.php
+++ b/tests/delay.php
@@ -11,7 +11,7 @@ $rr = new RoadRunner\Worker($relay);
while ($in = $rr->waitPayload()) {
try {
usleep($in->body * 1000);
- $rr->send('');
+ $rr->respond(new RoadRunner\Payload(''));
} catch (\Throwable $e) {
$rr->error((string)$e);
}
diff --git a/tests/echo.php b/tests/echo.php
index 83eec92e..64510465 100644
--- a/tests/echo.php
+++ b/tests/echo.php
@@ -10,7 +10,7 @@ $rr = new RoadRunner\Worker($relay);
while ($in = $rr->waitPayload()) {
try {
- $rr->send((string)$in->body);
+ $rr->respond(new RoadRunner\Payload((string)$in->body));
} catch (\Throwable $e) {
$rr->error((string)$e);
}
diff --git a/tests/head.php b/tests/head.php
index 3c57258f..80733166 100644
--- a/tests/head.php
+++ b/tests/head.php
@@ -10,7 +10,7 @@ $rr = new RoadRunner\Worker($relay);
while ($in = $rr->waitPayload()) {
try {
- $rr->send("", (string)$in->header);
+ $rr->respond(new RoadRunner\Payload("", (string)$in->header));
} catch (\Throwable $e) {
$rr->error((string)$e);
}
diff --git a/tests/memleak.php b/tests/memleak.php
index 169fe4f5..f2879e18 100644
--- a/tests/memleak.php
+++ b/tests/memleak.php
@@ -11,5 +11,5 @@ $rr = new RoadRunner(new StreamRelay(\STDIN, \STDOUT));
$mem = '';
while($rr->waitPayload()){
$mem .= str_repeat("a", 1024*1024);
- $rr->send("");
+ $rr->respond(new \Spiral\RoadRunner\Payload(""));
}
diff --git a/tests/pid.php b/tests/pid.php
index f8b2515d..962b609a 100644
--- a/tests/pid.php
+++ b/tests/pid.php
@@ -10,7 +10,7 @@
while ($in = $rr->waitPayload()) {
try {
- $rr->send((string)getmypid());
+ $rr->respond(new RoadRunner\Payload((string)getmypid()));
} catch (\Throwable $e) {
$rr->error((string)$e);
}
diff --git a/tests/plugins/server/socket.php b/tests/plugins/server/socket.php
index 3159c445..f90dda6f 100644
--- a/tests/plugins/server/socket.php
+++ b/tests/plugins/server/socket.php
@@ -18,7 +18,7 @@ $rr = new RoadRunner\Worker($relay);
while ($in = $rr->waitPayload()) {
try {
- $rr->send((string)$in->body);
+ $rr->respond(new RoadRunner\Payload((string)$in->body));
} catch (\Throwable $e) {
$rr->error((string)$e);
}
diff --git a/tests/plugins/server/tcp.php b/tests/plugins/server/tcp.php
index 88c49848..873f25b2 100644
--- a/tests/plugins/server/tcp.php
+++ b/tests/plugins/server/tcp.php
@@ -13,7 +13,7 @@ $rr = new RoadRunner\Worker($relay);
while ($in = $rr->waitPayload()) {
try {
- $rr->send((string)$in->body);
+ $rr->respond(new RoadRunner\Payload((string)$in->body));
} catch (\Throwable $e) {
$rr->error((string)$e);
}
diff --git a/tests/sleep.php b/tests/sleep.php
index e34a6834..fb5c9df2 100644
--- a/tests/sleep.php
+++ b/tests/sleep.php
@@ -11,5 +11,5 @@ $rr = new RoadRunner(new StreamRelay(\STDIN, \STDOUT));
while($rr->waitPayload()){
sleep(3);
- $rr->send("");
+ $rr->respond(new \Spiral\RoadRunner\Payload(""));
}
diff --git a/tests/slow-pid.php b/tests/slow-pid.php
index 3660cb40..82785610 100644
--- a/tests/slow-pid.php
+++ b/tests/slow-pid.php
@@ -11,7 +11,7 @@
while ($in = $rr->waitPayload()) {
try {
sleep(1);
- $rr->send((string)getmypid());
+ $rr->respond(new RoadRunner\Payload((string)getmypid()));
} catch (\Throwable $e) {
$rr->error((string)$e);
}
diff --git a/tests/stop.php b/tests/stop.php
index f83d3f29..93263821 100644
--- a/tests/stop.php
+++ b/tests/stop.php
@@ -18,7 +18,7 @@ while ($in = $rr->waitPayload()) {
}
$used = true;
- $rr->send((string)getmypid());
+ $rr->respond(new RoadRunner\Payload((string)getmypid()));
} catch (\Throwable $e) {
$rr->error((string)$e);
}