Passed
Push — master ( 979f6d...757493 )
by US
08:39 queued 11s
created

UnsetArrayElementsExtensionSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 3
1
<?php
2
3
/*
4
 * This file has been created by developers from BitBag.
5
 * Feel free to contact us once you face any issues or want to start
6
 * another great project.
7
 * You can find more information about us on https://bitbag.shop and write us
8
 * an email on [email protected].
9
 */
10
11
declare(strict_types=1);
12
13
namespace spec\BitBag\SyliusElasticsearchPlugin\Twig\Extension;
14
15
use BitBag\SyliusElasticsearchPlugin\Twig\Extension\UnsetArrayElementsExtension;
16
use PhpSpec\ObjectBehavior;
17
18
final class UnsetArrayElementsExtensionSpec extends ObjectBehavior
19
{
20
    function it_is_initializable(): void
21
    {
22
        $this->shouldHaveType(UnsetArrayElementsExtension::class);
23
    }
24
25
    function it_is_a_twig_extension(): void
26
    {
27
        $this->shouldHaveType(\Twig_Extension::class);
28
    }
29
30
    function it_unset_elments(): void
31
    {
32
        $elements = [
33
            'option_l' => 'L',
34
            'option_xl' => 'XL',
35
        ];
36
37
        $this->unsetElements($elements, ['option_xl'])->shouldBeEqualTo(['option_l' => 'L']);
38
    }
39
}
40