MessageRecorderSpec   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 26
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 6 1
A it_should_be_a_swift_listener() 0 4 1
A it_should_save_sent_mails() 0 6 1
1
<?php
2
3
namespace spec\Knp\RadBundle\Mailer;
4
5
use PhpSpec\ObjectBehavior;
6
7
class MessageRecorderSpec extends ObjectBehavior
8
{
9
    /**
10
     * @param Knp\RadBundle\Mailer\MessagesLogger $store
11
     * @param Swift_Events_SendEvent              $event
12
     * @param Swift_Mime_Message                  $message
13
     */
14
    function let($store, $event, $message)
15
    {
16
        $this->beConstructedWith($store);
17
18
        $event->getMessage()->willReturn($message);
19
    }
20
21
    function it_should_be_a_swift_listener()
0 ignored issues
show
Coding Style introduced by
Method name "MessageRecorderSpec::it_should_be_a_swift_listener" is not in camel caps format
Loading history...
22
    {
23
        $this->shouldBeAnInstanceOf('Swift_Events_SendListener');
24
    }
25
26
    function it_should_save_sent_mails($store, $event, $message)
0 ignored issues
show
Coding Style introduced by
Method name "MessageRecorderSpec::it_should_save_sent_mails" is not in camel caps format
Loading history...
27
    {
28
        $store->storeMessage($message)->shouldBeCalled();
29
30
        $this->sendPerformed($event);
31
    }
32
}
33