@@ -35,6 +35,9 @@ public function setUp(): void
3535 $this->parser = $this->createMock(ParserInterface::class);
3636 $this->serializer = $this->createMock(SerializerInterface::class);
3737
38+ assert($this->stream instanceof DuplexStreamInterface);
39+ assert($this->parser instanceof ParserInterface);
40+ assert($this->serializer instanceof SerializerInterface);
3841 $this->redis = new StreamingClient($this->stream, $this->parser, $this->serializer);
3942 }
4043
@@ -56,6 +59,8 @@ public function testClosingClientEmitsEvent(): void
5659 public function testClosingStreamClosesClient(): void
5760 {
5861 $stream = new ThroughStream();
62+ assert($this->parser instanceof ParserInterface);
63+ assert($this->serializer instanceof SerializerInterface);
5964 $this->redis = new StreamingClient($stream, $this->parser, $this->serializer);
6065
6166 $this->redis->on('close', $this->expectCallableOnce());
@@ -66,6 +71,8 @@ public function testClosingStreamClosesClient(): void
6671 public function testReceiveParseErrorEmitsErrorEvent(): void
6772 {
6873 $stream = new ThroughStream();
74+ assert($this->parser instanceof ParserInterface);
75+ assert($this->serializer instanceof SerializerInterface);
6976 $this->redis = new StreamingClient($stream, $this->parser, $this->serializer);
7077
7178 $this->redis->on('error', $this->expectCallableOnceWith(
@@ -88,6 +95,8 @@ public function testReceiveParseErrorEmitsErrorEvent(): void
8895 public function testReceiveUnexpectedReplyEmitsErrorEvent(): void
8996 {
9097 $stream = new ThroughStream();
98+ assert($this->parser instanceof ParserInterface);
99+ assert($this->serializer instanceof SerializerInterface);
91100 $this->redis = new StreamingClient($stream, $this->parser, $this->serializer);
92101
93102 $this->redis->on('error', $this->expectCallableOnce());
@@ -169,6 +178,9 @@ public function testClosingStreamRejectsAllRemainingRequests(): void
169178 {
170179 $stream = new ThroughStream(function () { return ''; });
171180 $this->parser->expects($this->once())->method('pushIncoming')->willReturn([]);
181+
182+ assert($this->parser instanceof ParserInterface);
183+ assert($this->serializer instanceof SerializerInterface);
172184 $this->redis = new StreamingClient($stream, $this->parser, $this->serializer);
173185
174186 $promise = $this->redis->ping();
0 commit comments