Fix PHP 7.4 deprecations in test setup

[MAILPOET-2588]
This commit is contained in:
Jan Jakeš
2019-12-19 16:37:03 +01:00
committed by amine-mp
parent f6c301f38f
commit 395a66228a
2 changed files with 6 additions and 6 deletions

View File

@@ -49,14 +49,14 @@ class IntegrationTester extends \Codeception\Actor { // phpcs:ignore PSR1.Classe
$charset = $specials . $alphabet;
// pick first letter in alphabet
$name .= $alphabet{mt_rand(0, strlen($alphabet) - 1)};
$name .= $alphabet[mt_rand(0, strlen($alphabet) - 1)];
for ($i = 0; $i < $length; $i++) {
$name .= $charset{mt_rand(0, strlen($charset) - 1)};
$name .= $charset[mt_rand(0, strlen($charset) - 1)];
}
// pick last letter in alphabet
$name .= $alphabet{mt_rand(0, strlen($alphabet) - 1)};
$name .= $alphabet[mt_rand(0, strlen($alphabet) - 1)];
return ucfirst($name);
}

View File

@@ -49,14 +49,14 @@ class UnitTester extends \Codeception\Actor { // phpcs:ignore PSR1.Classes.Class
$charset = $specials . $alphabet;
// pick first letter in alphabet
$name .= $alphabet{mt_rand(0, strlen($alphabet) - 1)};
$name .= $alphabet[mt_rand(0, strlen($alphabet) - 1)];
for ($i = 0; $i < $length; $i++) {
$name .= $charset{mt_rand(0, strlen($charset) - 1)};
$name .= $charset[mt_rand(0, strlen($charset) - 1)];
}
// pick last letter in alphabet
$name .= $alphabet{mt_rand(0, strlen($alphabet) - 1)};
$name .= $alphabet[mt_rand(0, strlen($alphabet) - 1)];
return ucfirst($name);
}