Export Testing - Call to undefined method Maatwebsite\Excel\Excel::fake() #3084
-
I am pretty new to Laravel Excel. However i managed to write multiple Classes and Controller to handle different exports with the help of the great documentation (using v3.1). However I am stuck at writing my test for those. Here are some parts of my code:
Upon running my test i get the errors:
However i managed to find out, that the ::assertDownlaoded function is now available in Maatwebsite\Excel\Fakes\ExcelFake.php; What am I missing here? Thanks for your help! :) |
Beta Was this translation helpful? Give feedback.
Answered by
patrickbrouwers
Mar 15, 2021
Replies: 1 comment 4 replies
-
You have to call it on the facade |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
kaip-e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to call it on the facade
Maatwebsite\Excel\Facades\Excel::fake()