Factory methods - dmirogin/fakemodel GitHub Wiki
Factory methods
Base methods
Model factory provide 2 way to create object
- make - Create instance of model and fill it by faked attributes
- create - Make model and persist it into database
Faked attributes are defined by Resolvers.
Properties
states
help resolvers to make models for certain situation.amount
Amount of models that will be made. Default is 1.