Code Duplication    Length = 8-8 lines in 3 locations

src/system/MailerModule/Tests/Api/MailerApiTest.php 3 locations

@@ 101-108 (lines=8) @@
98
        $this->assertEquals('body of message #5', $spooledMessage->getBody());
99
    }
100
101
    public function testSendMessageSetSubjectAndBody()
102
    {
103
        $message = $this->getMessage();
104
        $this->assertTrue($this->api->sendMessage($message, 'subject 789', 'body 789'));
105
        $spooledMessage = $this->mailSpool->getMessages()[0];
106
        $this->assertEquals('subject 789', $spooledMessage->getSubject());
107
        $this->assertEquals('body 789', $spooledMessage->getBody());
108
    }
109
110
    public function testSendHtml()
111
    {
@@ 110-117 (lines=8) @@
107
        $this->assertEquals('body 789', $spooledMessage->getBody());
108
    }
109
110
    public function testSendHtml()
111
    {
112
        $message = $this->getMessage();
113
        $this->assertTrue($this->api->sendMessage($message, 'subject 123', '<strong>body 123</strong>', '', true));
114
        $spooledMessage = $this->mailSpool->getMessages()[0];
115
        $this->assertEquals('<strong>body 123</strong>', $spooledMessage->getBody());
116
        $this->assertEquals('text/html', $spooledMessage->getContentType());
117
    }
118
119
    public function testSendMultipart()
120
    {
@@ 119-126 (lines=8) @@
116
        $this->assertEquals('text/html', $spooledMessage->getContentType());
117
    }
118
119
    public function testSendMultipart()
120
    {
121
        $message = $this->getMessage();
122
        $this->assertTrue($this->api->sendMessage($message, 'subject 234', '<strong>body 234</strong>', 'body 234'));
123
        $spooledMessage = $this->mailSpool->getMessages()[0];
124
        $this->assertEquals('<strong>body 234</strong>', $spooledMessage->getBody());
125
        $this->assertEquals('multipart/alternative', $spooledMessage->getContentType());
126
    }
127
128
    public function testSendWithCustomHeaders()
129
    {