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')))); }
/** * @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())); }
/** * @expectedException \CalendR\Event\Exception\NoProviderFound */ public function testFindWithoutProvider() { $manager = new Manager(); $manager->find(new Day(new \DateTime())); }