Completed
Push — master ( 0729b3...dbaae6 )
by Kamil
18:26
created

AssociationTypeSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 2 Features 0
Metric Value
wmc 3
c 4
b 2
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 4 1
A it_implements_association_type_interface() 0 4 1
A it_has_name() 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
namespace spec\Sylius\Component\Association\Model;
13
14
use PhpSpec\ObjectBehavior;
15
use Prophecy\Argument;
16
use Sylius\Component\Association\Model\AssociationTypeInterface;
17
18
/**
19
 * @author Leszek Prabucki <[email protected]>
20
 * @author Łukasz Chruściel <[email protected]>
21
 */
22
class AssociationTypeSpec extends ObjectBehavior
23
{
24
    function it_is_initializable()
25
    {
26
        $this->shouldHaveType('Sylius\Component\Association\Model\AssociationType');
27
    }
28
29
    function it_implements_association_type_interface()
30
    {
31
        $this->shouldImplement(AssociationTypeInterface::class);
32
    }
33
34
    function it_has_name()
35
    {
36
        $this->setName('Changed name');
37
        $this->getName()->shouldBe('Changed name');
38
    }
39
}
40