Code Duplication    Length = 16-16 lines in 3 locations

tests/JsonTest.php 3 locations

@@ 64-79 (lines=16) @@
61
    /**
62
     * @test
63
     */
64
    public function canMakeGetRequests()
65
    {
66
        $query = ['foo' => 'bar'];
67
68
        $this->mockClient()->request(
69
            'GET',
70
            $this->url('/foo'),
71
            [
72
                'query' => $query,
73
            ]
74
        )->willReturn($this->fooBarResponse());
75
76
        $data = $this->client->get('/foo', $query);
77
78
        $this->assertFooBarResponse($data);
79
    }
80
81
    /**
82
     * @test
@@ 130-145 (lines=16) @@
127
    /**
128
     * @test
129
     */
130
    public function canMakePostRequests()
131
    {
132
        $postData = ['foo' => 'bar'];
133
134
        $this->mockClient()->request(
135
            'POST',
136
            $this->url('/foo'),
137
            [
138
                'form_params' => $postData,
139
            ]
140
        )->willReturn($this->fooBarResponse());
141
142
        $data = $this->client->post('/foo', $postData);
143
144
        $this->assertFooBarResponse($data);
145
    }
146
147
    /**
148
     * @test
@@ 150-165 (lines=16) @@
147
    /**
148
     * @test
149
     */
150
    public function canMakePutRequest()
151
    {
152
        $putData = ['foo' => 'bar'];
153
154
        $this->mockClient()->request(
155
            'PUT',
156
            $this->url('/foo'),
157
            [
158
                'json' => $putData,
159
            ]
160
        )->willReturn($this->fooBarResponse());
161
162
        $data = $this->client->put('/foo', $putData);
163
164
        $this->assertFooBarResponse($data);
165
    }
166
167
    /**
168
     * @test