Welcome Guest, Not a member yet? Register   Sign In
How do I mock Models when testing?
#3

Thanks MGatner - that works!
Never used the model() call, that's why I "invented" my own factory(), but I guess I should rethink that approach now. Only object would be that it looks a bit ugly and redundant use of "model":
PHP Code:
$user model(UserModel::class)->find(28); 
Renaming all the models perhaps.... ugh...
Thanks again!
Reply


Messages In This Thread
How do I mock Models when testing? - by tgix - 06-17-2022, 03:50 AM
RE: How do I mock Models when testing? - by tgix - 06-17-2022, 04:19 AM
RE: How do I mock Models when testing? - by tgix - 06-19-2022, 07:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB