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