icomefromthenet / Faker

A Database Testing Tool.
Apache License 2.0
7 stars 2 forks source link

Pseudorandom number generator with seed. #2

Closed icomefromthenet closed 12 years ago

icomefromthenet commented 12 years ago

Using a Pseudorandom number generator can be helpful , php comes with http://www.php.net/manual/en/function.mt-srand.php mt_srand , its a functional interface need a wrapper to provide object interface.

This can be useful for text-generator, using the same seed will produce same results ie deterministic text generator on each iteration, tests can be written to expect these values.