Google Groups

Re: [silverstripe-dev] GSOC 2012 - Student wanted for "Improve Testing Framework"

Sam Minnée Apr 13, 2012 9:43 PM
Posted in group: SilverStripe Core Development
Ingo, I know that for projects with more complex domain models (say a booking engine, as a hypothetical example ;-) ) Factories can help abstract away the fixture plumbing. Mark Stephens might also have some opinions base on his current project.

I don't think we have a sufficiently complex domain model in core to make much of a difference, but as a tool in the arsenal it could be useful.

On 14/04/2012, at 12:41 AM, Ingo Schommer <> wrote:

Hey Michal,

If you look in our core unit tests, the fixtures are usually quite small,
and for the amount of characters used quite expressive, particularly
when it comes to relation aliasing (Parent: =>
Even if you ignore any PHP APIs, just using PHP's array() notation
will make this less readable than YAML. This is one of our longer ones:
Even at this length and level of repetition, I find it fairly easy to follow.

I think there's a tension between readability and maintainability here,
but my point is that it needs to be decided based on project requirements.
Then again, I've never worked with a generic factory API.
Had a look at a popular Rails one, and can definitely see its appeal:


You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at