@@ -35,6 +35,9 @@ public function setUp(): void
35
35
$ this ->parser = $ this ->createMock (ParserInterface::class);
36
36
$ this ->serializer = $ this ->createMock (SerializerInterface::class);
37
37
38
+ assert ($ this ->stream instanceof DuplexStreamInterface);
39
+ assert ($ this ->parser instanceof ParserInterface);
40
+ assert ($ this ->serializer instanceof SerializerInterface);
38
41
$ this ->redis = new StreamingClient ($ this ->stream , $ this ->parser , $ this ->serializer );
39
42
}
40
43
@@ -56,6 +59,8 @@ public function testClosingClientEmitsEvent(): void
56
59
public function testClosingStreamClosesClient (): void
57
60
{
58
61
$ stream = new ThroughStream ();
62
+ assert ($ this ->parser instanceof ParserInterface);
63
+ assert ($ this ->serializer instanceof SerializerInterface);
59
64
$ this ->redis = new StreamingClient ($ stream , $ this ->parser , $ this ->serializer );
60
65
61
66
$ this ->redis ->on ('close ' , $ this ->expectCallableOnce ());
@@ -66,6 +71,8 @@ public function testClosingStreamClosesClient(): void
66
71
public function testReceiveParseErrorEmitsErrorEvent (): void
67
72
{
68
73
$ stream = new ThroughStream ();
74
+ assert ($ this ->parser instanceof ParserInterface);
75
+ assert ($ this ->serializer instanceof SerializerInterface);
69
76
$ this ->redis = new StreamingClient ($ stream , $ this ->parser , $ this ->serializer );
70
77
71
78
$ this ->redis ->on ('error ' , $ this ->expectCallableOnceWith (
@@ -88,6 +95,8 @@ public function testReceiveParseErrorEmitsErrorEvent(): void
88
95
public function testReceiveUnexpectedReplyEmitsErrorEvent (): void
89
96
{
90
97
$ stream = new ThroughStream ();
98
+ assert ($ this ->parser instanceof ParserInterface);
99
+ assert ($ this ->serializer instanceof SerializerInterface);
91
100
$ this ->redis = new StreamingClient ($ stream , $ this ->parser , $ this ->serializer );
92
101
93
102
$ this ->redis ->on ('error ' , $ this ->expectCallableOnce ());
@@ -169,6 +178,9 @@ public function testClosingStreamRejectsAllRemainingRequests(): void
169
178
{
170
179
$ stream = new ThroughStream (function () { return '' ; });
171
180
$ this ->parser ->expects ($ this ->once ())->method ('pushIncoming ' )->willReturn ([]);
181
+
182
+ assert ($ this ->parser instanceof ParserInterface);
183
+ assert ($ this ->serializer instanceof SerializerInterface);
172
184
$ this ->redis = new StreamingClient ($ stream , $ this ->parser , $ this ->serializer );
173
185
174
186
$ promise = $ this ->redis ->ping ();
0 commit comments