Completed
Push — master ( 5503b7...fc88fd )
by Kamil
19:37
created

its_name_is_mutable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
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\Product\Model;
13
14
use PhpSpec\ObjectBehavior;
15
use Sylius\Component\Product\Model\ProductVariantTranslation;
16
use Sylius\Component\Product\Model\ProductVariantTranslationInterface;
17
use Sylius\Component\Resource\Model\AbstractTranslation;
18
19
/**
20
 * @author Mateusz Zalewski <[email protected]>
21
 */
22
final class ProductVariantTranslationSpec extends ObjectBehavior
23
{
24
    function it_is_initializable()
25
    {
26
        $this->shouldHaveType(ProductVariantTranslation::class);
27
    }
28
29
    function it_implements_product_variant_translation_interface()
30
    {
31
        $this->shouldImplement(ProductVariantTranslationInterface::class);
32
    }
33
34
    function it_is_translation()
35
    {
36
        $this->shouldHaveType(AbstractTranslation::class);
37
    }
38
39
    function it_has_no_name_by_default()
40
    {
41
        $this->getName()->shouldReturn(null);
42
    }
43
44
    function its_name_is_mutable()
45
    {
46
        $this->setName('Super variant');
47
        $this->getName()->shouldReturn('Super variant');
48
    }
49
}
50