Parses the last sent e-mail and returns the one-time login link URL.
function getPasswordResetURLFromMail() {
$mails = $this
->drupalGetMails();
$mail = end($mails);
preg_match('@.+user/reset/.+@', $mail['body'], $matches);
return $matches[0];
}