Completed
Push — 1.0-test-with-readonly-fs ( a9b7a7 )
by Kamil
44:32 queued 16:31
created

ProductTranslationSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 23
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A it_implements_a_core_product_interface() 0 4 1
A it_extends_a_product_translation_model() 0 4 1
A it_does_not_have_a_short_description_by_default() 0 4 1
A its_short_description_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\ProductTranslationInterface;
18
use Sylius\Component\Product\Model\ProductTranslation as BaseProductTranslation;
19
20
final class ProductTranslationSpec extends ObjectBehavior
21
{
22
    function it_implements_a_core_product_interface(): void
23
    {
24
        $this->shouldImplement(ProductTranslationInterface::class);
25
    }
26
27
    function it_extends_a_product_translation_model(): void
28
    {
29
        $this->shouldHaveType(BaseProductTranslation::class);
30
    }
31
32
    function it_does_not_have_a_short_description_by_default(): void
33
    {
34
        $this->getShortDescription()->shouldReturn(null);
35
    }
36
37
    function its_short_description_is_mutable(): void
38
    {
39
        $this->setShortDescription('Amazing product...');
40
        $this->getShortDescription()->shouldReturn('Amazing product...');
41
    }
42
}
43