Completed
Push — master ( bbd2b1...f08c3b )
by Kamil
31:47 queued 09:37
created

ShopBillingDataSpec   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 1
dl 0
loc 43
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A it_implements_shop_billing_data_interface() 0 4 1
A its_company_is_mutable() 0 5 1
A its_tax_id_is_mutable() 0 5 1
A its_country_code_is_mutable() 0 5 1
A its_street_is_mutable() 0 5 1
A its_city_is_mutable() 0 5 1
A its_postcode_is_mutable() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace spec\Sylius\Component\Core\Model;
15
16
use PhpSpec\ObjectBehavior;
17
use Sylius\Component\Core\Model\ShopBillingDataInterface;
18
19
final class ShopBillingDataSpec extends ObjectBehavior
20
{
21
    function it_implements_shop_billing_data_interface(): void
22
    {
23
        $this->shouldImplement(ShopBillingDataInterface::class);
24
    }
25
26
    function its_company_is_mutable(): void
27
    {
28
        $this->setCompany('Ragnarok');
29
        $this->getCompany()->shouldReturn('Ragnarok');
30
    }
31
32
    function its_tax_id_is_mutable(): void
33
    {
34
        $this->setTaxId('1100110011');
35
        $this->getTaxId()->shouldReturn('1100110011');
36
    }
37
38
    function its_country_code_is_mutable(): void
39
    {
40
        $this->setCountryCode('US');
41
        $this->getCountryCode()->shouldReturn('US');
42
    }
43
44
    function its_street_is_mutable(): void
45
    {
46
        $this->setStreet('Blue Street');
47
        $this->getStreet()->shouldReturn('Blue Street');
48
    }
49
50
    function its_city_is_mutable(): void
51
    {
52
        $this->setCity('New York');
53
        $this->getCity()->shouldReturn('New York');
54
    }
55
56
    function its_postcode_is_mutable(): void
57
    {
58
        $this->setPostcode('94111');
59
        $this->getPostcode()->shouldReturn('94111');
60
    }
61
}
62