示例#1
0
 /**
  * @test
  */
 public function limitToAttendeeWithNullFindsRegistrationsWithOtherAttendee()
 {
     $feUserGroupUid = $this->testingFramework->createFrontEndUserGroup();
     $feUserUid = $this->testingFramework->createFrontEndUser($feUserGroupUid);
     $feUserUid2 = $this->testingFramework->createFrontEndUser($feUserGroupUid);
     $eventUid = $this->testingFramework->createRecord('tx_seminars_seminars');
     $registrationUid = $this->testingFramework->createRecord('tx_seminars_attendances', array('seminar' => $eventUid, 'user' => $feUserUid2));
     /** @var tx_seminars_Model_FrontEndUser $user */
     $user = tx_oelib_MapperRegistry::get('tx_seminars_Mapper_FrontEndUser')->find($feUserUid);
     $this->fixture->limitToAttendee($user);
     $this->fixture->limitToAttendee(NULL);
     $bag = $this->fixture->build();
     self::assertEquals($registrationUid, $bag->current()->getUid());
 }