@@ -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
@@ -1610,7 +1607,7 @@ function ($string) {
1610
1607
$ this ->customerSecure ->expects ($ this ->once ())->method ('setRpTokenCreatedAt ' )->with (null );
1611
1608
$ this ->customerSecure ->expects ($ this ->any ())->method ('setPasswordHash ' )->willReturn (null );
1612
1609
1613
- $ this ->sessionManager ->expects ( $ this -> atLeastOnce ())-> method ( ' destroy ' );
1610
+ $ this ->sessionManager ->method ( ' isSessionExists ' )-> willReturn ( false );
1614
1611
$ this ->sessionManager ->expects ($ this ->atLeastOnce ())->method ('getSessionId ' );
1615
1612
$ visitor = $ this ->getMockBuilder (\Magento \Customer \Model \Visitor::class)
1616
1613
->disableOriginalConstructor ()
0 commit comments