function OpenIDWebTestCase::getPasswordResetURLFromMail
Parses the last sent e-mail and returns the one-time login link URL.
3 calls to OpenIDWebTestCase::getPasswordResetURLFromMail()
- OpenIDRegistrationTestCase::testRegisterUserWithEmailVerification in modules/
openid/ openid.test - Test OpenID auto-registration with e-mail verification enabled.
- OpenIDRegistrationTestCase::testRegisterUserWithInvalidSreg in modules/
openid/ openid.test - Test OpenID auto-registration with a provider that supplies invalid SREG information (a username that is already taken, and no e-mail address).
- OpenIDRegistrationTestCase::testRegisterUserWithoutSreg in modules/
openid/ openid.test - Test OpenID auto-registration with a provider that does not supply SREG information (i.e. no username or e-mail address).
File
-
modules/
openid/ openid.test, line 31
Class
- OpenIDWebTestCase
- Base class for OpenID tests.
Code
function getPasswordResetURLFromMail() {
$mails = $this->drupalGetMails();
$mail = end($mails);
preg_match('@.+user/reset/.+@', $mail['body'], $matches);
return $matches[0];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.