Code Duplication    Length = 16-16 lines in 3 locations

tests/JsonTest.php 3 locations

@@ 48-63 (lines=16) @@
45
    /**
46
     * @test
47
     */
48
    public function canMakeGetRequests()
49
    {
50
        $query = ['foo' => 'bar'];
51
52
        $this->mockClient()->request(
53
            'GET',
54
            $this->url('/foo'),
55
            [
56
                'query' => $query,
57
            ]
58
        )->willReturn($this->fooBarResponse());
59
60
        $data = $this->client->get('/foo', $query);
61
62
        $this->assertFooBarResponse($data);
63
    }
64
65
    /**
66
     * @test
@@ 114-129 (lines=16) @@
111
    /**
112
     * @test
113
     */
114
    public function canMakePostRequests()
115
    {
116
        $postData = ['foo' => 'bar'];
117
118
        $this->mockClient()->request(
119
            'POST',
120
            $this->url('/foo'),
121
            [
122
                'form_params' => $postData,
123
            ]
124
        )->willReturn($this->fooBarResponse());
125
126
        $data = $this->client->post('/foo', $postData);
127
128
        $this->assertFooBarResponse($data);
129
    }
130
131
    /**
132
     * @test
@@ 134-149 (lines=16) @@
131
    /**
132
     * @test
133
     */
134
    public function canMakePutRequest()
135
    {
136
        $putData = ['foo' => 'bar'];
137
138
        $this->mockClient()->request(
139
            'PUT',
140
            $this->url('/foo'),
141
            [
142
                'json' => $putData,
143
            ]
144
        )->willReturn($this->fooBarResponse());
145
146
        $data = $this->client->put('/foo', $putData);
147
148
        $this->assertFooBarResponse($data);
149
    }
150
151
    /**
152
     * @return \Prophecy\Prophecy\ObjectProphecy