コード例 #1
0
ファイル: ManagerTest.php プロジェクト: roadrunner/CalendR
 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'))));
 }
コード例 #2
0
ファイル: ManagerTest.php プロジェクト: morloderex/CalendR
 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())));
 }