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

CustomerShowMenuBuilderEventSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 22
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_is_initializable() 0 4 1
A it_is_a_menu_builder_event() 0 4 1
A it_has_a_customer() 0 4 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 Sylius\Bundle\AdminBundle\Event\CustomerShowMenuBuilderEvent;
18
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
19
use Sylius\Component\Core\Model\CustomerInterface;
20
21
/**
22
 * @author Grzegorz Sadowski <[email protected]>
23
 */
24
final class CustomerShowMenuBuilderEventSpec extends ObjectBehavior
25
{
26
    function let(FactoryInterface $factory, ItemInterface $menu, CustomerInterface $customer)
27
    {
28
        $this->beConstructedWith($factory, $menu, $customer);
29
    }
30
31
    function it_is_initializable()
32
    {
33
        $this->shouldHaveType(CustomerShowMenuBuilderEvent::class);
34
    }
35
36
    function it_is_a_menu_builder_event()
37
    {
38
        $this->shouldHaveType(MenuBuilderEvent::class);
39
    }
40
41
    function it_has_a_customer(CustomerInterface $customer)
42
    {
43
        $this->getCustomer()->shouldReturn($customer);
44
    }
45
}
46