thephpleague / factory-muffin

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

[3.0] Abstracted Some Definition Code #355

Closed GrahamCampbell closed 9 years ago

GrahamCampbell commented 9 years ago

Progress:

Now, when we define a definition, we store it as a Definition instance in an array, instead of being split across two arrays. This new definition class is also responsible for working out what group the model is in, and what it's actual class name is.

What this means is that we now have a really clean way to define model definitions, and we can they can be accessed and inspected/modified later. We also have the added benafit in that our users don't need to remember the parameter order anymore for the define function since they're be using chainable setters on the definition object.