Example #1
0
 public function testCollectionInstatiator()
 {
     $this->assertInstanceOf('CalendR\\Event\\Collection\\Basic', $this->object->find(new Month(new \DateTime('2012-01-01'))));
     $this->object->setCollectionInstantiator(function () {
         return new \CalendR\Event\Collection\Indexed();
     });
     $this->assertInstanceOf('CalendR\\Event\\Collection\\Indexed', $this->object->find(new Month(new \DateTime('2012-01-01'))));
 }
Example #2
0
 public function testCollectionInstatiator()
 {
     $this->assertInstanceOf('CalendR\\Event\\Collection\\Basic', $this->object->find(new Month(new \DateTime('2012-01-01 00:00'), $this->prophesize(FactoryInterface::class)->reveal())));
     $this->object->setCollectionInstantiator(function () {
         return new Indexed();
     });
     $this->assertInstanceOf('CalendR\\Event\\Collection\\Indexed', $this->object->find(new Month(new \DateTime('2012-01-01'), $this->prophesize(FactoryInterface::class)->reveal())));
 }