Code Duplication    Length = 9-9 lines in 4 locations

spec/Anshar/Http/RequestSpec.php 4 locations

@@ 224-232 (lines=9) @@
221
     * While header names are case-insensitive, the casing of the header will
222
     * be preserved by this function, and returned from getHeaders().
223
     */
224
    function it_returns_a_new_request_with_a_header_update_in_a_case_insensitive_way()
225
    {
226
        $header = "FOO";
227
        $value = "qux";
228
229
        $request = $this->withHeader($header, $value);
230
231
        $request->getHeaderLine("foo")->shouldBe($value);
232
    }
233
234
    /**
235
     * Return an instance with the provided value replacing the specified header.
@@ 237-245 (lines=9) @@
234
    /**
235
     * Return an instance with the provided value replacing the specified header.
236
     */
237
    function it_returns_a_new_request_with_a_header_update_with_an_array_of_values()
238
    {
239
        $header = "foo";
240
        $values = array("qux", "quux");
241
242
        $request = $this->withHeader($header, $values);
243
244
        $request->getHeaderLine($header)->shouldBe("qux,quux");
245
    }
246
247
    /**
248
     * This method MUST be implemented in such a way as to retain the
@@ 328-336 (lines=9) @@
325
     * Existing values for the specified header will be maintained. The new
326
     * value(s) will be appended to the existing list.
327
     */
328
    function it_returns_a_new_request_with_a_header_added_with_an_array_of_values()
329
    {
330
        $header = "foo";
331
        $values = array("qux", "quux");
332
333
        $request = $this->withAddedHeader($header, $values);
334
335
        $request->getHeaderLine($header)->shouldBe("bar,baz,qux,quux");
336
    }
337
338
    /**
339
     * If the header did not exist previously, it will be added.
@@ 341-349 (lines=9) @@
338
    /**
339
     * If the header did not exist previously, it will be added.
340
     */
341
    function it_returns_a_new_request_with_a_header_created_given_a_nonexistent_header()
342
    {
343
        $header = "bar";
344
        $values = array("qux", "quux");
345
346
        $request = $this->withAddedHeader($header, $values);
347
348
        $request->getHeaderLine($header)->shouldBe("qux,quux");
349
    }
350
351
    /**
352
     * This method MUST be implemented in such a way as to retain the