Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
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 | } |
||
53 |