예제 #1
0
 /**
  * Check if given user is autorised to get mails (Ie. Active or Restricted) user.
  *
  * @param Array of users $recipients
  *
  * @return Array of user_name and mail
  */
 private function validateArrayOfUsers(array $users)
 {
     return $this->recipient_list_builder->getValidRecipientsFromUsers($users);
 }
 public function itValidatesAListOfUsers()
 {
     $list = $this->builder->getValidRecipientsFromUsers(array($this->active_user, $this->deleted_user, $this->bob_suspended_user, $this->bob_active_user));
     $expected = array(array('email' => $this->active_user_address, 'real_name' => $this->active_user_name), array('email' => $this->bob_active_user_address, 'real_name' => $this->bob_active_user_name));
     $this->assertEqual($expected, $list);
 }