Completed
Push — master ( 860366...55daec )
by Kamil
19:37
created

it_implements_theme_context_interface()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
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\Bundle\ThemeBundle\Context;
13
14
use PhpSpec\ObjectBehavior;
15
use Prophecy\Argument;
16
use Sylius\Bundle\ThemeBundle\Context\SettableThemeContext;
17
use Sylius\Bundle\ThemeBundle\Context\ThemeContextInterface;
18
use Sylius\Bundle\ThemeBundle\HierarchyProvider\ThemeHierarchyProviderInterface;
19
use Sylius\Bundle\ThemeBundle\Model\ThemeInterface;
20
21
/**
22
 * @mixin SettableThemeContext
23
 *
24
 * @author Kamil Kokot <[email protected]>
25
 */
26
class SettableThemeContextSpec extends ObjectBehavior
27
{
28
    function it_is_initializable()
29
    {
30
        $this->shouldHaveType('Sylius\Bundle\ThemeBundle\Context\SettableThemeContext');
31
    }
32
33
    function it_implements_theme_context_interface()
34
    {
35
        $this->shouldImplement(ThemeContextInterface::class);
36
    }
37
38
    function it_has_theme(ThemeInterface $theme)
39
    {
40
        $this->getTheme()->shouldReturn(null);
41
42
        $this->setTheme($theme);
43
        $this->getTheme()->shouldReturn($theme);
44
    }
45
}
46