Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class CalendarEventSpec extends ObjectBehavior |
||
10 | { |
||
11 | private $start; |
||
12 | private $end; |
||
13 | private $filters; |
||
14 | |||
15 | public function let() |
||
16 | { |
||
17 | $this->start = new \DateTime('2019-03-18 08:41:31'); |
||
18 | $this->end = new \DateTime('2019-03-18 08:41:31'); |
||
19 | $this->filters = []; |
||
20 | |||
21 | $this->beAnInstanceOf(CalendarEvent::class); |
||
22 | $this->beConstructedWith($this->start, $this->end, $this->filters); |
||
23 | } |
||
24 | |||
25 | public function it_is_initializable() |
||
26 | { |
||
27 | $this->shouldHaveType(CalendarEvent::class); |
||
28 | } |
||
29 | |||
30 | public function it_has_require_values() |
||
31 | { |
||
32 | $this->getStart()->shouldReturn($this->start); |
||
33 | $this->getEnd()->shouldReturn($this->end); |
||
34 | $this->getFilters()->shouldReturn($this->filters); |
||
35 | } |
||
36 | |||
37 | public function it_handle_events( |
||
38 | Event $event |
||
39 | ) { |
||
40 | $this->addEvent($event); |
||
41 | $this->getEvents()->shouldReturn([$event]); |
||
42 | } |
||
44 |