Code Duplication    Length = 18-18 lines in 2 locations

tests/Mailjet/NewsletterTest.php 2 locations

@@ 68-85 (lines=18) @@
65
    }
66
67
    /** @test */
68
    public function it_can_subscribe_someone()
69
    {
70
        $this->response->shouldReceive('success')->andReturn(true);
71
72
        $this->client->shouldReceive('post')->withArgs([
73
            Resources::$ContactslistManagecontact,[
74
                'id' => '123',
75
                'body' => [
76
                    'Email' => "[email protected]",
77
                    'Action' => "addnoforce",
78
                    'Name' => 'Martin',
79
                ]
80
            ]
81
82
        ])->andReturn($this->response);
83
84
        $this->newsletter->subscribe('[email protected]', ['Name' => 'Martin']);
85
    }
86
87
    /** @test */
88
    public function it_can_subscribe_or_update_someone()
@@ 88-105 (lines=18) @@
85
    }
86
87
    /** @test */
88
    public function it_can_subscribe_or_update_someone()
89
    {
90
        $this->response->shouldReceive('success')->andReturn(true);
91
92
        $this->client->shouldReceive('post')->withArgs([
93
            Resources::$ContactslistManagecontact,[
94
                'id' => '123',
95
                'body' => [
96
                    'Email' => "[email protected]",
97
                    'Action' => "addnoforce",
98
                    'Name' => 'Martin',
99
                ]
100
            ]
101
102
        ])->andReturn($this->response);
103
104
        $this->newsletter->subscribeOrUpdate('[email protected]', ['Name' => 'Martin']);
105
    }
106
107
    /** @test */
108
    public function it_will_trow_an_exception_when_subscribe_with_an_invalid_email()