1 user_password_reset.test protected UserPasswordResetTest::getResetURL()

Retrieves password reset email and extracts the login link.

File

core/modules/user/tests/user_password_reset.test, line 40
Tests for resetting the password.

Class

UserPasswordResetTest

Code

protected function getResetURL() {
  // Assume the most recent email.
  $_emails = $this->backdropGetMails();
  $email = end($_emails);
  $urls = array();
  preg_match('#.+user/reset/.+#', $email['body'], $urls);

  return $urls[0];
}