Code Duplication    Length = 19-19 lines in 2 locations

test/functional/RequestFunctionalTest.php 2 locations

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