summaryrefslogtreecommitdiff
path: root/tests/test_worker.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_worker.php')
-rw-r--r--tests/test_worker.php32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/test_worker.php b/tests/test_worker.php
deleted file mode 100644
index d0cf7bb3..00000000
--- a/tests/test_worker.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-use Spiral\RoadRunner;
-use Nyholm\Psr7;
-
-include "vendor/autoload.php";
-
-$worker = RoadRunner\Worker::create();
-$psrFactory = new Psr7\Factory\Psr17Factory();
-
-$worker = new RoadRunner\Http\PSR7Worker($worker, $psrFactory, $psrFactory, $psrFactory);
-$counter = 0;
-
-while ($req = $worker->waitRequest()) {
- try {
- $rsp = new Psr7\Response();
-
- if ($req->getUri()->getPath() !== '/') {
- $worker->respond($rsp->withStatus(404));
- continue;
- }
-
- $rsp->getBody()->write('Hello world!');
- $rsp->getBody()->write(PHP_EOL);
- $rsp->getBody()->write((string)$counter++);
-
- $worker->respond($rsp);
-
- } catch (\Throwable $e) {
- $worker->getWorker()->error((string)$e);
- }
-} \ No newline at end of file