@@ -1238,8 +1238,7 @@ public function testInitiatePasswordResetEmailReminder()
1238
1238
1239
1239
$ storeId = 1 ;
1240
1240
1241
- mt_srand (mt_rand () + (100000000 * (float )microtime ()) % PHP_INT_MAX );
1242
- $ hash = md5 (uniqid (microtime () . mt_rand (0 , mt_getrandmax ()), true ));
1241
+ $ hash = hash ('sha256 ' , microtime () . random_int (PHP_INT_MIN , PHP_INT_MAX ));
1243
1242
1244
1243
$ this ->emailNotificationMock ->expects ($ this ->once ())
1245
1244
->method ('passwordReminder ' )
@@ -1263,8 +1262,7 @@ public function testInitiatePasswordResetEmailReset()
1263
1262
$ templateIdentifier = 'Template Identifier ' ;
1264
1263
$ sender = 'Sender ' ;
1265
1264
1266
- mt_srand (mt_rand () + (100000000 * (float )microtime ()) % PHP_INT_MAX );
1267
- $ hash = md5 (uniqid (microtime () . mt_rand (0 , mt_getrandmax ()), true ));
1265
+ $ hash = hash ('sha256 ' , microtime () . random_int (PHP_INT_MIN , PHP_INT_MAX ));
1268
1266
1269
1267
$ this ->emailNotificationMock ->expects ($ this ->once ())
1270
1268
->method ('passwordResetConfirmation ' )
@@ -1288,8 +1286,7 @@ public function testInitiatePasswordResetNoTemplate()
1288
1286
$ templateIdentifier = 'Template Identifier ' ;
1289
1287
$ sender = 'Sender ' ;
1290
1288
1291
- mt_srand (mt_rand () + (100000000 * (float )microtime ()) % PHP_INT_MAX );
1292
- $ hash = md5 (uniqid (microtime () . mt_rand (0 , mt_getrandmax ()), true ));
1289
+ $ hash = hash ('sha256 ' , microtime () . random_int (PHP_INT_MIN , PHP_INT_MAX ));
1293
1290
1294
1291
$ this ->prepareInitiatePasswordReset ($ email , $ templateIdentifier , $ sender , $ storeId , $ customerId , $ hash );
1295
1292
0 commit comments