Code Duplication    Length = 19-19 lines in 2 locations

test/functional/RequestFunctionalTest.php 2 locations

@@ 117-135 (lines=19) @@
114
        })->wait();
115
    }
116
117
    public function testFooRequest()
118
    {
119
        $id = 'abc';
120
        $method = 'foo';
121
        $request = $this->client->request($id, $method, []);
122
        $response = $this->client->send($request);
123
124
        $this->assertEquals(ClientInterface::SPEC, $request->getRpcVersion());
125
        $this->assertEquals($id, $request->getRpcId());
126
        $this->assertEquals($method, $request->getRpcMethod());
127
        $this->assertEquals(null, $request->getRpcParams());
128
129
        $this->assertEquals(ClientInterface::SPEC, $response->getRpcVersion());
130
        $this->assertEquals('foo', $response->getRpcResult());
131
        $this->assertEquals($id, $response->getRpcId());
132
        $this->assertEquals(null, $response->getRpcErrorCode());
133
        $this->assertEquals(null, $response->getRpcErrorMessage());
134
        $this->assertEquals(null, $response->getRpcErrorData());
135
    }
136
137
    public function testFooAsyncRequest()
138
    {
@@ 159-177 (lines=19) @@
156
        })->wait();
157
    }
158
159
    public function testBarRequest()
160
    {
161
        $id = 'abc';
162
        $method = 'bar';
163
        $request = $this->client->request($id, $method, []);
164
        $response = $this->client->send($request);
165
166
        $this->assertEquals(ClientInterface::SPEC, $request->getRpcVersion());
167
        $this->assertEquals($id, $request->getRpcId());
168
        $this->assertEquals($method, $request->getRpcMethod());
169
        $this->assertEquals(null, $request->getRpcParams());
170
171
        $this->assertEquals(ClientInterface::SPEC, $response->getRpcVersion());
172
        $this->assertEquals(null, $response->getRpcResult());
173
        $this->assertEquals($id, $response->getRpcId());
174
        $this->assertTrue(is_int($response->getRpcErrorCode()));
175
        $this->assertTrue(is_string($response->getRpcErrorMessage()));
176
        $this->assertEquals(null, $response->getRpcErrorData());
177
    }
178
179
    public function testBarAsyncRequest()
180
    {