Code Duplication    Length = 21-23 lines in 2 locations

tests/MailChimp/NewsletterTest.php 2 locations

@@ 98-120 (lines=23) @@
95
    }
96
97
    /** @test */
98
    public function it_can_subscribe_someone_as_pending()
99
    {
100
        $this->client->shouldReceive('success')->andReturn(true);
101
102
        $email = '[email protected]';
103
104
        $url = 'lists/123/members';
105
106
        $options = [
107
            'status' => 'pending'
108
        ];
109
110
        $this->client->shouldReceive('post')->withArgs([
111
            $url,
112
            [
113
                'email_address' => $email,
114
                'status' => 'pending',
115
                'email_type' => 'html',
116
            ],
117
        ]);
118
119
        $this->newsletter->subscribe($email, $options);
120
    }
121
122
    /** @test */
123
    public function it_can_subscribe_or_update_someone()
@@ 257-277 (lines=21) @@
254
    }
255
256
    /** @test */
257
    public function it_can_subscribe_someone_to_an_alternative_list()
258
    {
259
        $this->client->shouldReceive('success')->andReturn(true);
260
261
        $email = '[email protected]';
262
263
        $url = 'lists/456/members';
264
265
        $this->client->shouldReceive('post')
266
            ->once()
267
            ->withArgs([
268
                $url,
269
                [
270
                    'email_address' => $email,
271
                    'status' => 'subscribed',
272
                    'email_type' => 'html',
273
                ],
274
            ]);
275
276
        $this->newsletter->subscribe($email, [], 'list2');
277
    }
278
279
    /** @test */
280
    public function it_can_subscribe_or_update_someone_to_an_alternative_list()