Completed
Push — pull-request/7609 ( 4ccf63...393b85 )
by Kamil
146:59 queued 125:08
created

ChannelPricingSpec::its_channel_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 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\Core\Model;
13
14
use PhpSpec\ObjectBehavior;
15
use Sylius\Component\Core\Model\ChannelInterface;
16
use Sylius\Component\Core\Model\ChannelPricing;
17
use Sylius\Component\Core\Model\ChannelPricingInterface;
18
use Sylius\Component\Core\Model\ProductVariantInterface;
19
20
/**
21
 * @author Mateusz Zalewski <[email protected]>
22
 */
23
final class ChannelPricingSpec extends ObjectBehavior
24
{
25
    function it_is_initializable()
26
    {
27
        $this->shouldHaveType(ChannelPricing::class);
28
    }
29
30
    function it_implements_channel_pricing_interface()
31
    {
32
        $this->shouldImplement(ChannelPricingInterface::class);
33
    }
34
35
    function its_channel_code_is_mutable()
36
    {
37
        $this->setChannelCode('WEB');
38
        $this->getChannelCode()->shouldReturn('WEB');
39
    }
40
41
    function its_product_variant_is_mutable(ProductVariantInterface $productVariant)
42
    {
43
        $this->setProductVariant($productVariant);
44
        $this->getProductVariant()->shouldReturn($productVariant);
45
    }
46
47
    function its_price_is_mutable()
48
    {
49
        $this->setPrice(1000);
50
        $this->getPrice()->shouldReturn(1000);
51
    }
52
}
53