summaryrefslogtreecommitdiff
path: root/tests/worker-stop.php
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-10-27 22:50:03 +0300
committerGitHub <[email protected]>2021-10-27 22:50:03 +0300
commitc8c3f9f113eae13aa37cf92043b288bb0c68a622 (patch)
tree42f8ab386735d5f8b002907d07249e94b4c10a12 /tests/worker-stop.php
parent1f62e21020cc3014e9eb2dc33c154de6dd5b22d5 (diff)
parentab591e7f122e28857cef00c905a8125992ea3cdf (diff)
[#838]: feat(events): events package deep refactoringv2.6.0-alpha.1
[#838]: feat(events): events package deep refactoring
Diffstat (limited to 'tests/worker-stop.php')
-rw-r--r--tests/worker-stop.php26
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/worker-stop.php b/tests/worker-stop.php
deleted file mode 100644
index 83fc5710..00000000
--- a/tests/worker-stop.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * @var Goridge\RelayInterface $relay
- */
-use Spiral\Goridge;
-use Spiral\RoadRunner;
-
-ini_set('display_errors', 'stderr');
-require __DIR__ . "/vendor/autoload.php";
-
-$worker = new RoadRunner\Worker(new Goridge\StreamRelay(STDIN, STDOUT));
-$psr7 = new RoadRunner\Http\PSR7Worker(
- $worker,
- new \Nyholm\Psr7\Factory\Psr17Factory(),
- new \Nyholm\Psr7\Factory\Psr17Factory(),
- new \Nyholm\Psr7\Factory\Psr17Factory()
-);
-
-while ($req = $psr7->waitRequest()) {
- try {
- $resp = new \Nyholm\Psr7\Response();
- $psr7->respond($resp->withAddedHeader('stop', 'we-dont-like-you')->withStatus(401));
- } catch (\Throwable $e) {
- $psr7->getWorker()->error((string)$e);
- }
-}