Example #1
0
 /**
  * @dataProvider getEventsProvider
  */
 public function testGetEvents($begin, $end, array $expectedEvents)
 {
     foreach ($this->getSomeEvents() as $event) {
         $this->object->add($event);
     }
     $events = $this->object->getEvents($begin, $end);
     $this->assertSame(count($expectedEvents), count($events));
     foreach ($events as $i => $event) {
         $this->assertSame('event-' . $expectedEvents[$i], $events[$i]->getUid());
     }
 }
Example #2
0
 public function testNoErrorWhenNoEvents()
 {
     $this->assertSame(array(), $this->object->getEvents(new \DateTime('2013-06-01'), new \DateTime('2013-07-01')));
 }