Completed
Push — 1.0-phpstan ( ddfe6c )
by Kamil
23:36
created

OrderShowMenuBuilderEventSpec::let()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 4
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\Bundle\AdminBundle\Event;
15
16
use Knp\Menu\FactoryInterface;
17
use Knp\Menu\ItemInterface;
18
use PhpSpec\ObjectBehavior;
19
use SM\StateMachine\StateMachineInterface;
20
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
21
use Sylius\Component\Core\Model\OrderInterface;
22
23
final class OrderShowMenuBuilderEventSpec extends ObjectBehavior
24
{
25
    function let(
26
        FactoryInterface $factory,
27
        ItemInterface $menu,
28
        OrderInterface $order,
29
        StateMachineInterface $stateMachine
30
    ): void {
31
        $this->beConstructedWith($factory, $menu, $order, $stateMachine);
32
    }
33
34
    function it_is_a_menu_builder_event(): void
35
    {
36
        $this->shouldHaveType(MenuBuilderEvent::class);
37
    }
38
39
    function it_has_an_order(OrderInterface $order): void
40
    {
41
        $this->getOrder()->shouldReturn($order);
42
    }
43
44
    function it_has_a_state_machine(StateMachineInterface $stateMachine): void
45
    {
46
        $this->getStateMachine()->shouldReturn($stateMachine);
47
    }
48
}
49