diff --git a/templates/resetPassword/Test.ResetPasswordController.tpl.php b/templates/resetPassword/Test.ResetPasswordController.tpl.php index 16a28b3e5..8ffbba143 100644 --- a/templates/resetPassword/Test.ResetPasswordController.tpl.php +++ b/templates/resetPassword/Test.ResetPasswordController.tpl.php @@ -70,7 +70,9 @@ public function testResetPasswordController(): void self::assertStringContainsString('This link will expire in 1 hour', $crawler->html()); // Test the link sent in the email is valid - $email = $messages[0]->toString(); + /** @var array $messages */ + $email = $messages[0]->getTextBody(); + self::assertIsString($email); preg_match('#(/reset-password/reset/[a-zA-Z0-9]+)#', $email, $resetLink); $this->client->request('GET', $resetLink[1]);