Code Duplication    Length = 16-16 lines in 3 locations

tests/JsonTest.php 3 locations

@@ 57-72 (lines=16) @@
54
    /**
55
     * @test
56
     */
57
    public function canMakeGetRequests()
58
    {
59
        $query = ['foo' => 'bar'];
60
61
        $this->mockClient()->request(
62
            'GET',
63
            $this->url('/foo'),
64
            [
65
                'query' => $query,
66
            ]
67
        )->willReturn($this->fooBarResponse());
68
69
        $data = $this->client->get('/foo', $query);
70
71
        $this->assertFooBarResponse($data);
72
    }
73
74
    /**
75
     * @test
@@ 123-138 (lines=16) @@
120
    /**
121
     * @test
122
     */
123
    public function canMakePostRequests()
124
    {
125
        $postData = ['foo' => 'bar'];
126
127
        $this->mockClient()->request(
128
            'POST',
129
            $this->url('/foo'),
130
            [
131
                'form_params' => $postData,
132
            ]
133
        )->willReturn($this->fooBarResponse());
134
135
        $data = $this->client->post('/foo', $postData);
136
137
        $this->assertFooBarResponse($data);
138
    }
139
140
    /**
141
     * @test
@@ 143-158 (lines=16) @@
140
    /**
141
     * @test
142
     */
143
    public function canMakePutRequest()
144
    {
145
        $putData = ['foo' => 'bar'];
146
147
        $this->mockClient()->request(
148
            'PUT',
149
            $this->url('/foo'),
150
            [
151
                'json' => $putData,
152
            ]
153
        )->willReturn($this->fooBarResponse());
154
155
        $data = $this->client->put('/foo', $putData);
156
157
        $this->assertFooBarResponse($data);
158
    }
159
160
    /**
161
     * @test