xi-project/xi-doctrine — pull request #7 by panunu (2012-05-23 13:57:55+00:00)
Title: Add getUnpersisted-method for FixtureFactory

For most test cases it is better to persistOnGet by default to reduce duplicate code.

The problem arises when we are using persistOnGet and want a non-persisted Entity. One would still like to utilize FixtureFactory, so there would be no need to create the Entity and it's relationships all over again in the test code.

Of course you could always trigger ```$factory->persistOnGet(false)``` before ```$factory->get()``` or remove the Entity after persisting it. But these do not seem like plausible solutions.

I am not so fond of the "getUnpersisted" name though... any suggestions?

Tests: pass.