public function testMultipleIrelatedInstances() { $model = new Tx_CzSimpleCal_Domain_Model_EventIndex(); $model->setStart(1234567890); $model->setEnd(1234567890); $this->viewHelper->render($model); self::assertSame('tag content', $this->viewHelper->render($model, 'foobar')); }
/** * create the indexes * * @param Tx_CzSimpleCal_Domain_Model_Event $event */ protected function doCreate($event) { $event->setLastIndexed(new DateTime()); $this->eventRepository->update($event); if (!$event->isEnabled()) { return; } // get all recurrances... foreach ($event->getRecurrances() as $recurrance) { // ...and store them to the repository $instance = Tx_CzSimpleCal_Domain_Model_EventIndex::fromArray($recurrance); $this->eventIndexRepository->add($instance); } // store everything to database manually to allow correct unique hash creation when using scheduler // $this->persistenceManager->persistAll(); }