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

ItemSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 21
c 1
b 0
f 0
dl 0
loc 34
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\DTO;
14
15
use PhpSpec\ObjectBehavior;
16
17
final class ItemSpec extends ObjectBehavior
18
{
19
    function let(): void
20
    {
21
        $this->beConstructedWith(
22
            'Super cars',
23
            'McLaren F1',
24
            'Very quirky super-car',
25
            '/mc-laren/f1',
26
            '$22,000,000.00',
27
            ''
28
        );
29
    }
30
31
    function it_returns_an_array(): void
32
    {
33
        $this->toArray()->shouldReturn([
34
            'taxon_name' => 'Super cars',
35
            'name' => 'McLaren F1',
36
            'description' => 'Very quirky super-car',
37
            'slug' => '/mc-laren/f1',
38
            'price' => '$22,000,000.00',
39
            'image' => '',
40
        ]);
41
    }
42
43
    function it_returns_values(): void
44
    {
45
        $this->taxonName()->shouldReturn('Super cars');
46
        $this->name()->shouldReturn('McLaren F1');
47
        $this->description()->shouldReturn('Very quirky super-car');
48
        $this->slug()->shouldReturn('/mc-laren/f1');
49
        $this->price()->shouldReturn('$22,000,000.00');
50
        $this->image()->shouldReturn('');
51
    }
52
}
53