Completed
Push — master ( 155c16...880d18 )
by Kamil
26:05
created

its_presentation_should_be_mutable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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\Variation\Model;
13
14
use PhpSpec\ObjectBehavior;
15
use Sylius\Component\Variation\Model\OptionTranslationInterface;
16
17
/**
18
 * @author Gonzalo Vilaseca <[email protected]>
19
 */
20
class OptionTranslationSpec extends ObjectBehavior
21
{
22
    function it_is_initializable()
23
    {
24
        $this->shouldHaveType('Sylius\Component\Variation\Model\OptionTranslation');
25
    }
26
27
    function it_implement_Sylius_option_interface()
28
    {
29
        $this->shouldImplement(OptionTranslationInterface::class);
30
    }
31
32
    function it_should_not_have_id_by_default()
33
    {
34
        $this->getId()->shouldReturn(null);
35
    }
36
37
    function it_should_not_have_name_by_default()
38
    {
39
        $this->getName()->shouldReturn(null);
40
    }
41
42
    function its_name_should_be_mutable()
43
    {
44
        $this->setName('Size');
45
        $this->getName()->shouldReturn('Size');
46
    }
47
}
48