public function testSettersAndGetters()
 {
     $options = new ModuleOptions(['emailFromAddress' => '*****@*****.**', 'verification_email_template' => 'application/mail/verify-email.phtml', 'password_request_email_template' => 'application/mail/set-password.phtml', 'enable_request_expiry' => true, 'request_expiry' => 1000000, 'registration_table_name' => 'user_registration123', 'registration_entity_class' => 'Application\\Entity\\UserRegistration', 'send_verification_email' => false, 'send_password_request_email' => false, 'verification_email_subject' => 'Your Email Address Verification', 'password_request_email_subject' => 'Please Set Your Password', 'post_verification_route' => 'zfcuser']);
     $this->assertEquals('*****@*****.**', $options->getEmailFromAddress());
     $this->assertEquals('application/mail/verify-email.phtml', $options->getVerificationEmailTemplate());
     $this->assertEquals('application/mail/set-password.phtml', $options->getPasswordRequestEmailTemplate());
     $this->assertEquals(true, $options->getEnableRequestExpiry());
     $this->assertEquals(1000000, $options->getRequestExpiry());
     $this->assertEquals('user_registration123', $options->getRegistrationTableName());
     $this->assertEquals('Application\\Entity\\UserRegistration', $options->getRegistrationEntityClass());
     $this->assertEquals(false, $options->getSendVerificationEmail());
     $this->assertEquals(false, $options->getSendPasswordRequestEmail());
     $this->assertEquals('Your Email Address Verification', $options->getVerificationEmailSubject());
     $this->assertEquals('Please Set Your Password', $options->getPasswordRequestEmailSubject());
     $this->assertEquals('zfcuser', $options->getPostVerificationRoute());
 }
예제 #2
0
 /**
  * {@inheritDoc}
  */
 public function sendPasswordRequestEmail(UserRegistrationInterface $registrationRecord)
 {
     $this->sendMail($registrationRecord, $this->options->getPasswordRequestEmailSubject(), $this->options->getPasswordRequestEmailTemplate());
 }