function OpenIDWebTestCase::getPasswordResetURLFromMail in Drupal 7
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 - Tests for openid.module.
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];
}