Completed
Push — 1.1 ( a31ef9...1f9e88 )
by Kamil
31:00 queued 05:01
created

ProductTaxonSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A it_implements_product_taxon_interface() 0 4 1
A it_has_mutable_product_field() 0 5 1
A it_has_mutable_taxon_field() 0 5 1
A it_has_mutable_position_field() 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\ProductInterface;
18
use Sylius\Component\Core\Model\ProductTaxonInterface;
19
use Sylius\Component\Core\Model\TaxonInterface;
20
21
final class ProductTaxonSpec extends ObjectBehavior
22
{
23
    function it_implements_product_taxon_interface(): void
24
    {
25
        $this->shouldImplement(ProductTaxonInterface::class);
26
    }
27
28
    function it_has_mutable_product_field(ProductInterface $product): void
29
    {
30
        $this->setProduct($product);
31
        $this->getProduct()->shouldReturn($product);
32
    }
33
34
    function it_has_mutable_taxon_field(TaxonInterface $taxon): void
35
    {
36
        $this->setTaxon($taxon);
37
        $this->getTaxon()->shouldReturn($taxon);
38
    }
39
40
    function it_has_mutable_position_field(): void
41
    {
42
        $this->setPosition(1);
43
        $this->getPosition()->shouldReturn(1);
44
    }
45
}
46