Ejemplo n.º 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'))));
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \CalendR\Event\Exception\NoProviderFound
  */
 public function testFindWithoutProvider()
 {
     $manager = new Manager();
     $manager->find(new Day(new \DateTime('00:00:00'), $this->prophesize(FactoryInterface::class)->reveal()));
 }
Ejemplo n.º 3
0
 /**
  * @expectedException \CalendR\Event\Exception\NoProviderFound
  */
 public function testFindWithoutProvider()
 {
     $manager = new Manager();
     $manager->find(new Day(new \DateTime()));
 }