summaryrefslogtreecommitdiff
path: root/tests/slow-destroy.php
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-23 15:31:52 +0300
committerWolfy-J <[email protected]>2018-09-23 15:31:52 +0300
commit5bdff4aea88a6c74c67abe447cbb47ddd58b7bc7 (patch)
tree031647c71a33303771a0c7701fa17775528955c8 /tests/slow-destroy.php
parentdac0e9cb81cf49cb5967c04eb494709ee3f164d9 (diff)
more coverage
Diffstat (limited to 'tests/slow-destroy.php')
-rw-r--r--tests/slow-destroy.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/slow-destroy.php b/tests/slow-destroy.php
new file mode 100644
index 00000000..0f0abc1c
--- /dev/null
+++ b/tests/slow-destroy.php
@@ -0,0 +1,37 @@
+<?php
+
+use Spiral\Goridge;
+
+ini_set('display_errors', 'stderr');
+require dirname(__DIR__) . "/vendor/autoload.php";
+
+if (count($argv) < 3) {
+ die("need 2 arguments");
+}
+
+list($test, $goridge) = [$argv[1], $argv[2]];
+
+switch ($goridge) {
+ case "pipes":
+ $relay = new Goridge\StreamRelay(STDIN, STDOUT);
+ break;
+
+ case "tcp":
+ $relay = new Goridge\SocketRelay("localhost", 9007);
+ break;
+
+ case "unix":
+ $relay = new Goridge\SocketRelay(
+ "sock.unix",
+ null,
+ Goridge\SocketRelay::SOCK_UNIX
+ );
+ break;
+
+ default:
+ die("invalid protocol selection");
+}
+
+require_once sprintf("%s/%s.php", __DIR__, $test);
+
+sleep(10); \ No newline at end of file