Unit testing #871
Unanswered
digitall-it
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The documentation is missing a clear example on how to unit test a laravel-data class. As the package relies on config facade, it cannot resolve the dependency in the unit tests, and the user has to figure out himself what to do or move the test to feature tests so it will have to boot the entire Laravel application. I would like to find a golden standard solution so that I can try making a PR to the documentation. For example, let's imagine the SongData structure used as an example in the documentation. You may argue that DTO are simple objects that don't need any form of testing, and that could be a valid point per se, but it could be worth a shot to cover all the bases. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions