Code Duplication    Length = 13-14 lines in 2 locations

Test/Formatter/MailDataFormatterTest.php 2 locations

@@ 24-36 (lines=13) @@
21
        );
22
    }
23
24
    public function testFormat()
25
    {
26
        $message = $this->formatter->format($this->notification);
27
28
        $this->assertInstanceOf('IrishDan\NotificationBundle\Message\MessageInterface', $message);
29
30
        $this->assertValidDispatchData($message);
31
        $this->assertMessageDataStructure($message);
32
33
        $messageData = $message->getMessageData();
34
        $this->assertEquals('New member', $messageData['title']);
35
        $this->assertEquals('A new member has just joined', $messageData['body']);
36
    }
37
38
    public function testFormatWithTwig()
39
    {
@@ 38-51 (lines=14) @@
35
        $this->assertEquals('A new member has just joined', $messageData['body']);
36
    }
37
38
    public function testFormatWithTwig()
39
    {
40
        $twig = $this->getService('twig');
41
        $this->formatter->setTemplating($twig);
42
        $message = $this->formatter->format($this->notification);
43
44
        $this->assertValidDispatchData($message);
45
        $this->assertMessageDataStructure($message);
46
47
        $messageData = $message->getMessageData();
48
49
        $this->assertEquals('New member', $messageData['title']);
50
        $this->assertEquals('Mail notification message for jimBob', $messageData['body']);
51
    }
52
53
    public function assertMessageDataStructure(MessageInterface $message)
54
    {