Add seeds to data fixtures, to avoid random failures in tests

This commit is contained in:
2026-03-09 13:00:30 +00:00
parent e2dec28577
commit a921009eff
16 changed files with 78 additions and 41 deletions

View File

@@ -30,6 +30,7 @@ class LoadThirdParty extends Fixture implements DependentFixtureInterface
public function __construct()
{
mt_srand(123456789);
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
}
@@ -68,7 +69,7 @@ class LoadThirdParty extends Fixture implements DependentFixtureInterface
static fn ($a) => $a['ref'],
LoadCenters::$centers
);
$number = random_int(1, \count($references));
$number = mt_rand(1, \count($references));
if (1 === $number) {
yield $this->getReference($references[array_rand($references)], Center::class);