Passed
Pull Request — master (#12)
by romain
09:45
created

CallTrackingPostMessageSpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 24
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace spec\Yproximite\Api\Message\CallTracking;
4
5
use PhpSpec\ObjectBehavior;
6
use Yproximite\Api\Message\CallTracking\CallTrackingPostMessage;
7
8
class CallTrackingPostMessageSpec extends ObjectBehavior
9
{
10
    function it_is_initializable()
11
    {
12
        $this->shouldHaveType(CallTrackingPostMessage::class);
13
    }
14
15
    function it_should_build()
16
    {
17
        $this->setName('Simple call');
18
        $this->setPhoneDid('+1 123 233 99 91');
19
        $this->setPhoneDestination('+1 921 339 44 77');
20
        $this->setCallerId(true);
21
22
        $data = [
23
            'name'             => 'Simple call',
24
            'phoneDid'         => '+1 123 233 99 91',
25
            'phoneDestination' => '+1 921 339 44 77',
26
            'callerId'         => 1,
27
        ];
28
29
        $this->build()->shouldReturn($data);
30
    }
31
}
32