CallTrackingPostMessageSpec::it_should_build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 9.7333
c 0
b 0
f 0
cc 1
nc 1
nop 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