Summary
I've run into issues assuming a faker instance created via the factory is isolated from other faker instances.
Versions
|
Version |
| PHP |
8.4.12 |
fakerphp/faker |
1.24.1 |
Self-enclosed code snippet for reproduction
use Faker\Factory;
test('faker should return the same uuid on different instances', function () {
$f1 = Factory::create();
$f1->seed(0);
$f2 = Factory::create();
$f2->seed(0);
expect($f1->uuid())->toBe($f2->uuid());
});
Expected output
Test passed
Actual output
Failed asserting that two strings are identical.
Expected :'46d87f7a-fb2f-35f9-a552-02133b0464df'
Actual :'e72d9fb1-c496-3ce0-bdb5-cb77f63adfb4'
Summary
I've run into issues assuming a faker instance created via the factory is isolated from other faker instances.
Versions
fakerphp/fakerSelf-enclosed code snippet for reproduction
Expected output
Test passed
Actual output