示例#1
0
 public function testLimitToExistingUsersDoesNotFindRegistrationWithDeletedUser()
 {
     $feUserUid = $this->testingFramework->createFrontEndUser();
     $this->testingFramework->changeRecord('fe_users', $feUserUid, array('deleted' => 1));
     $this->testingFramework->createRecord('tx_seminars_attendances', array('user' => $feUserUid));
     $this->fixture->limitToExistingUsers();
     $bag = $this->fixture->build();
     self::assertTrue($bag->isEmpty());
 }
 /**
  * Returns the list of registrations as CSV separated values.
  *
  * The fields are separated by semicolons and the lines by CRLF.
  *
  * @param tx_seminars_BagBuilder_Registration $builder
  *        the bag builder already limited to the registrations which should be returned
  *
  * @return string[] the list of registrations, will be empty if no registrations have been given
  *
  * @throws RuntimeException
  */
 protected function getRegistrationsCsvList(tx_seminars_BagBuilder_Registration $builder)
 {
     $csvLines = array();
     /** @var $bag tx_seminars_Bag_Registration */
     $bag = $builder->build();
     /** @var tx_seminars_registration $registration */
     foreach ($bag as $registration) {
         $userData = $this->createCsvColumnsForFrontEndUser($registration);
         $registrationData = $this->createCsvColumnsForRegistration($registration);
         $csvLines[] = implode(self::COLUMN_SEPARATOR, array_merge($userData, $registrationData));
     }
     return $csvLines;
 }