We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I changed the ForgotPasswordMail structure at the following branch https://github.com/RonasIT/laravel-empty-project/tree/error-when-testing-mail-content and found that if we do not use a viewData it fails tests.
viewData
Illuminate\View\ViewException: Undefined variable $hash (View: /app/resources/views/emails/forgot_password.blade.php) /app/storage/framework/views/ebbd7a56f1475ebab6e4bb80cd203236.php:25 /app/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:60 /app/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:73 /app/vendor/laravel/framework/src/Illuminate/View/View.php:208 /app/vendor/laravel/framework/src/Illuminate/View/View.php:191 /app/vendor/laravel/framework/src/Illuminate/View/View.php:160 /app/vendor/ronasit/laravel-helpers/src/Traits/MailsMockTrait.php:188 /app/vendor/ronasit/laravel-helpers/src/Traits/MailsMockTrait.php:79 /app/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php:374 /app/vendor/laravel/framework/src/Illuminate/Collections/Arr.php:926 /app/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:369 /app/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php:374 /app/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php:210 /app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:357 /app/vendor/ronasit/laravel-helpers/src/Traits/MailsMockTrait.php:66 /app/tests/AuthTest.php:259
This row is the reason for error https://github.com/RonasIT/laravel-helpers/blob/master/src/Traits/MailsMockTrait.php#L188
{ $view = (method_exists($mail, 'content')) ? $mail->content()->view : $mail->view; $mailContent = view($view, $mail->viewData)->render(); if ($exportMode) { $this->exportContent($mailContent, $expectedMailData['fixture']); }
We support only viewData but a Mailable object may not have any viewData.
The text was updated successfully, but these errors were encountered:
DenTray
No branches or pull requests
I changed the ForgotPasswordMail structure at the following branch https://github.com/RonasIT/laravel-empty-project/tree/error-when-testing-mail-content and found that if we do not use a
viewData
it fails tests.This row is the reason for error https://github.com/RonasIT/laravel-helpers/blob/master/src/Traits/MailsMockTrait.php#L188
We support only viewData but a Mailable object may not have any viewData.
The text was updated successfully, but these errors were encountered: