We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
wait
parallel
1 parent 6a4240f commit b7e2127Copy full SHA for b7e2127
tests/ServerTest.php
@@ -63,6 +63,7 @@ public function testDeferOnOpenInCoroutineStyleServer()
63
public function testEngineServer()
64
{
65
$serv = new FooServer();
66
- $this->assertSame(1, $serv->getServer());
+ $id = rand(0, 99999);
67
+ $this->assertSame($id, $serv->getServer($id));
68
}
69
tests/Stub/FooServer.php
@@ -12,11 +12,12 @@
12
namespace HyperfTest\WebSocketServer\Stub;
13
14
use Hyperf\Engine\Http\Server as HttpServer;
15
+use Swow\Http\Server\Connection;
16
17
class FooServer
18
- public function getServer(): HttpServer|int
19
+ public function getServer(int|Connection $id): HttpServer|int
20
- return 1;
21
+ return $id;
22
23
0 commit comments