Code Duplication    Length = 7-9 lines in 3 locations

tests/ResponseTest.php 2 locations

@@ 33-41 (lines=9) @@
30
        $this->assertSame('Not Found', $r->getReasonPhrase());
31
    }
32
33
    public function testConstructorDoesNotReadStreamBody()
34
    {
35
        $body = $this->getMockBuilder(StreamInterface::class)->getMock();
36
        $body->expects($this->never())
37
            ->method('__toString');
38
39
        $r = new Response(200, [], $body);
40
        $this->assertSame($body, $r->getBody());
41
    }
42
43
    public function testStatusCanBeNumericString()
44
    {
@@ 137-143 (lines=7) @@
134
        $this->assertSame($r, $r->withProtocolVersion('1.1'));
135
    }
136
137
    public function testWithBody()
138
    {
139
        $b = (new \Nyholm\Psr7\Factory\Psr17Factory())->createStream('0');
140
        $r = (new Response())->withBody($b);
141
        $this->assertInstanceOf(StreamInterface::class, $r->getBody());
142
        $this->assertSame('0', (string) $r->getBody());
143
    }
144
145
    public function testSameInstanceWhenSameBody()
146
    {

tests/RequestTest.php 1 location

@@ 57-65 (lines=9) @@
54
        $this->assertSame('0', (string) $r->getBody());
55
    }
56
57
    public function testConstructorDoesNotReadStreamBody()
58
    {
59
        $body = $this->getMockBuilder(StreamInterface::class)->getMock();
60
        $body->expects($this->never())
61
            ->method('__toString');
62
63
        $r = new Request('GET', '/', [], $body);
64
        $this->assertSame($body, $r->getBody());
65
    }
66
67
    public function testWithUri()
68
    {