Closed ottersfish closed 9 years ago
Why do you have the User
factory defined twice? You are supposed to make one factory for each model. Also are your models namespaced? If so you need to include that in the first argument like so
$factory('App\User', [
//properties
];
Thanks for the reply! Sorry I forget to say that I am using Laravel 4. It is twice because the other one I need for making specific type of user. Anyway after I retry using it again suddenly it works :) maybe I did it wrong inside my test class.
I am trying to do unit test (if I have the correct understanding) with testDummy, it supposed to return an object from Eloquent model, in this case called user, but instead it showed this error message
this is my factories.php file:
and I'm calling the testDummy like this:
Thanks in advance, and sorry if this issue is off topic, I'm still new to this community. :)