cakephp-fixture-factories
cakephp-fixture-factories copied to clipboard
Add a way to define a seed for faker
It could be done dynamically on a 'per test' basis in the setUp method of a phpunit test case Or maybe through a config file. Using this method would seed the whole test suite. Will have to see which option is the best suited. I would go for the first one alogside a 'default' seed
To add a faker seed at the factory level with a setFakerSeed native method?
You would have:
$article = ArticleFactory::make()->setFakerSeed(123)
I think it is then the role of the developer to define a $SeededArticleFactory in setUp() to be reused in each test.
That is the way I would solve the problem.