SitePostMessageSpec   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 40
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 4 1
A it_should_build() 0 32 1
1
<?php
2
3
namespace spec\Yproximite\Api\Message\Site;
4
5
use PhpSpec\ObjectBehavior;
6
7
use Yproximite\Api\Model\Site\Site;
8
use Yproximite\Api\Message\Site\SitePostMessage;
9
10
class SitePostMessageSpec extends ObjectBehavior
11
{
12
    function it_is_initializable()
13
    {
14
        $this->shouldHaveType(SitePostMessage::class);
15
    }
16
17
    function it_should_build()
18
    {
19
        $this->setTitle('Hello world!');
20
        $this->setDataParentId(5);
21
        $this->setThemeId(1);
22
        $this->setContactEmail('[email protected]');
23
        $this->setHost('hello-world.com');
24
        $this->setDefaultLocale('en');
25
        $this->setCompanyId(1);
26
        $this->setSendRegistrationEmail(true);
27
        $this->setZohoManager('Manager');
28
        $this->setZohoStatus('Active');
29
        $this->setBillingStatus(Site::BILLING_STATUS_DIRECT);
30
        $this->setImportRef('12345af');
31
32
        $data = [
33
            'title'                 => 'Hello world!',
34
            'dataParent'            => 5,
35
            'theme'                 => 1,
36
            'contactEmail'          => '[email protected]',
37
            'host'                  => 'hello-world.com',
38
            'defaultLocale'         => 'en',
39
            'company'               => 1,
40
            'sendRegistrationEmail' => true,
41
            'zohoManager'           => 'Manager',
42
            'zohoStatus'            => 'Active',
43
            'billingStatus'         => 'direct',
44
            'importRef'             => '12345af',
45
        ];
46
47
        $this->build()->shouldReturn($data);
48
    }
49
}
50