thephpleague / factory-muffin

Enables the rapid creation of objects for testing
https://factory-muffin.thephpleague.com/
MIT License
532 stars 72 forks source link

Setters and getters in FactoryGenerator #439

Closed biserantonov closed 4 years ago

biserantonov commented 7 years ago

FactoryGenerator has very limited lists of methods and properties for accessing models primary keys. For example in Yii2 framework the method for accessing primary key is getPrimaryKey(). With this commit setters and getters are added so these lists can be modified.

GrahamCampbell commented 4 years ago

I'd probably recommend making your own specific class that extends the entity generator class. I don't like modifying stuff at runtime like this. I'd much prefer the class to be immutable.