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

ItemsResponseSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 24
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\Controller\Response;
14
15
use BitBag\SyliusElasticsearchPlugin\Controller\Response\DTO\Item;
16
use PhpSpec\ObjectBehavior;
17
18
final class ItemsResponseSpec extends ObjectBehavior
19
{
20
    function let(): void
21
    {
22
        $this->beConstructedThrough('createEmpty');
23
    }
24
25
    function it_can_add_items(): void
26
    {
27
        $this->addItem(new Item(
28
            'Super cars',
29
            'McLaren F1',
30
            'Very quirky super-car',
31
            '/mc-laren/f1',
32
            '$22,000,000.00',
33
            ''
34
        ));
35
36
        $this->all()->shouldHaveCount(1);
37
    }
38
39
    function it_returns_an_array(): void
40
    {
41
        $this->toArray()->shouldBeArray();
42
    }
43
}
44