/** * @test */ public function sendRemindersToOrganizersForEventWithTwoOrganizersSendsEmailWithFirstOrganizerAsSender() { $eventUid = $this->createSeminarWithOrganizer(array('begin_date' => $GLOBALS['SIM_EXEC_TIME'] + tx_oelib_Time::SECONDS_PER_DAY, 'cancelled' => tx_seminars_seminar::STATUS_CONFIRMED)); $organizerUid = $this->testingFramework->createRecord('tx_seminars_organizers', array('title' => 'foo', 'email' => '*****@*****.**')); $this->testingFramework->createRelation('tx_seminars_seminars_organizers_mm', $eventUid, $organizerUid); $this->testingFramework->changeRecord('tx_seminars_seminars', $eventUid, array('organizers' => 2)); $this->fixture->sendEventTakesPlaceReminders(); self::assertArrayHasKey('*****@*****.**', $this->mailer->getFirstSentEmail()->getFrom()); }
/** * @test */ public function removeRelationOnValidDummyRecordOnAdditionalAllowedTableSucceeds() { $this->checkIfExtensionUserOelibtestIsLoaded(); $uidLocal = $this->subject->createRecord('user_oelibtest_test'); $uidForeign = $this->subject->createRecord('user_oelibtest_test'); // Creates and directly destroys a dummy record. $this->subject->createRelation('user_oelibtest_test_article_mm', $uidLocal, $uidForeign); $this->subject->removeRelation('user_oelibtest_test_article_mm', $uidLocal, $uidForeign); }
public function testLimitToTopicsWithoutRegistrationByUserAndLimitToRequiredEventTopicsCanReturnOneEntry() { $requiredTopicUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('object_type' => tx_seminars_Model_Event::TYPE_TOPIC)); $this->testingFramework->createRecord('tx_seminars_seminars', array('object_type' => tx_seminars_Model_Event::TYPE_DATE, 'topic' => $requiredTopicUid)); $eventUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('requirements' => 1, 'object_type' => tx_seminars_Model_Event::TYPE_TOPIC)); $this->testingFramework->createRelation('tx_seminars_seminars_requirements_mm', $eventUid, $requiredTopicUid); $this->fixture->limitToRequiredEventTopics($eventUid); $this->fixture->limitToTopicsWithoutRegistrationByUser($this->testingFramework->createFrontEndUser()); $bag = $this->fixture->build(); self::assertSame(1, $bag->count()); }
/** * Creates a FE user, adds him/her as a VIP to the seminar with the UID in * $this->seminarUid and logs him/her in. * * @return void */ private function createLogInAndAddFeUserAsVip() { $seminarUid = $this->testingFramework->createRecord('tx_seminars_seminars', array('vips' => 1)); $this->testingFramework->createRelation('tx_seminars_seminars_feusers_mm', $seminarUid, $this->testingFramework->createAndLoginFrontEndUser()); $this->fixture->setObjectUid($seminarUid); }