Mocking models. #53457
Unanswered
mbaptista10
asked this question in
Q&A
Mocking models.
#53457
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
Is there a way to mock a model? In a way that allows me to verify if certain functions of this model were invoked correctly?
Example:
I would like to verify if the
create
function was called correctly, only once, and with the correct parameters.I know I can check if the items were inserted into my database, but I'd like to go further and explicitly verify if the model’s functions were called correctly.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions