Code Duplication    Length = 19-19 lines in 2 locations

tests/MailerTest.php 2 locations

@@ 77-95 (lines=19) @@
74
        ];
75
    }
76
77
    public function testSendPlain()
78
    {
79
        list($to, $from, $subject, $content, $plainContent, $attachments, $headers) = $this->getMockEmail();
80
81
        $mailer = $this->getMock('Kinglozzer\SilverStripeMailgunner\Mailer', ['sendMessage']);
82
        $mailer->expects($this->once())
83
            ->method('sendMessage')
84
            ->with(
85
                $this->equalTo($to),
86
                $this->equalTo($from),
87
                $this->equalTo($subject),
88
                $this->equalTo(''),
89
                $this->equalTo($plainContent),
90
                $this->equalTo($attachments),
91
                $this->equalTo($headers)
92
            );
93
94
        $mailer->sendPlain($to, $from, $subject, $plainContent, $attachments, $headers);
95
    }
96
97
    public function testSendHTML()
98
    {
@@ 97-115 (lines=19) @@
94
        $mailer->sendPlain($to, $from, $subject, $plainContent, $attachments, $headers);
95
    }
96
97
    public function testSendHTML()
98
    {
99
        list($to, $from, $subject, $content, $plainContent, $attachments, $headers) = $this->getMockEmail();
100
101
        $mailer = $this->getMock('Kinglozzer\SilverStripeMailgunner\Mailer', ['sendMessage']);
102
        $mailer->expects($this->once())
103
            ->method('sendMessage')
104
            ->with(
105
                $this->equalTo($to),
106
                $this->equalTo($from),
107
                $this->equalTo($subject),
108
                $this->equalTo($content),
109
                $this->equalTo($plainContent),
110
                $this->equalTo($attachments),
111
                $this->equalTo($headers)
112
            );
113
114
        $mailer->sendHTML($to, $from, $subject, $content, $attachments, $headers, $plainContent);
115
    }
116
117
    public function testSendMessage()
118
    {