Completed
Push — locale-in-url ( b918e2...821ef5 )
by Kamil
48:02 queued 26:12
created

OrderShowMenuBuilderEventSpec::it_has_an_order()   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 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\Bundle\AdminBundle\Event;
13
14
use Knp\Menu\FactoryInterface;
15
use Knp\Menu\ItemInterface;
16
use PhpSpec\ObjectBehavior;
17
use SM\StateMachine\StateMachineInterface;
18
use Sylius\Bundle\AdminBundle\Event\OrderShowMenuBuilderEvent;
19
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
20
use Sylius\Component\Core\Model\OrderInterface;
21
22
/**
23
 * @author Grzegorz Sadowski <[email protected]>
24
 */
25
final class OrderShowMenuBuilderEventSpec extends ObjectBehavior
26
{
27
    function let(
28
        FactoryInterface $factory,
29
        ItemInterface $menu,
30
        OrderInterface $order,
31
        StateMachineInterface $stateMachine
32
    ) {
33
        $this->beConstructedWith($factory, $menu, $order, $stateMachine);
34
    }
35
36
    function it_is_initializable()
37
    {
38
        $this->shouldHaveType(OrderShowMenuBuilderEvent::class);
39
    }
40
41
    function it_is_a_menu_builder_event()
42
    {
43
        $this->shouldHaveType(MenuBuilderEvent::class);
44
    }
45
46
    function it_has_an_order(OrderInterface $order)
47
    {
48
        $this->getOrder()->shouldReturn($order);
49
    }
50
51
    function it_has_a_state_machine(StateMachineInterface $stateMachine)
52
    {
53
        $this->getStateMachine()->shouldReturn($stateMachine);
54
    }
55
}
56