@@ -1318,19 +1318,15 @@ private function reInitModel()
1318
1318
]
1319
1319
)
1320
1320
->getMock ();
1321
-
1322
1321
$ this ->customerSecure
1323
1322
->expects ($ this ->any ())
1324
1323
->method ('getRpToken ' )
1325
1324
->willReturn ('newStringToken ' );
1326
-
1327
1325
$ pastDateTime = '2016-10-25 00:00:00 ' ;
1328
-
1329
1326
$ this ->customerSecure
1330
1327
->expects ($ this ->any ())
1331
1328
->method ('getRpTokenCreatedAt ' )
1332
1329
->willReturn ($ pastDateTime );
1333
-
1334
1330
$ this ->customer = $ this ->getMockBuilder (\Magento \Customer \Model \Customer::class)
1335
1331
->disableOriginalConstructor ()
1336
1332
->setMethods (['getResetPasswordLinkExpirationPeriod ' ])
@@ -1363,17 +1359,14 @@ private function reInitModel()
1363
1359
->method ('format ' )
1364
1360
->with (\Magento \Framework \Stdlib \DateTime::DATETIME_PHP_FORMAT )
1365
1361
->willReturn ($ dateTime );
1366
-
1367
1362
$ dateTimeMock
1368
1363
->expects ($ this ->any ())
1369
1364
->method ('getTimestamp ' )
1370
1365
->willReturn ($ timestamp );
1371
-
1372
1366
$ dateTimeMock
1373
1367
->expects ($ this ->any ())
1374
1368
->method ('setTimestamp ' )
1375
1369
->willReturnSelf ();
1376
-
1377
1370
$ dateTimeFactory = $ this ->getMockBuilder (DateTimeFactory::class)
1378
1371
->disableOriginalConstructor ()
1379
1372
->setMethods (['create ' ])
@@ -1400,10 +1393,11 @@ private function reInitModel()
1400
1393
'transportBuilder ' => $ this ->transportBuilder ,
1401
1394
]
1402
1395
);
1403
- $ reflection = new \ReflectionClass (get_class ($ this ->accountManagement ));
1404
- $ reflectionProperty = $ reflection ->getProperty ('authentication ' );
1405
- $ reflectionProperty ->setAccessible (true );
1406
- $ reflectionProperty ->setValue ($ this ->accountManagement , $ this ->authenticationMock );
1396
+ $ this ->objectManagerHelper ->setBackwardCompatibleProperty (
1397
+ $ this ->accountManagement ,
1398
+ 'authentication ' ,
1399
+ $ this ->authenticationMock
1400
+ );
1407
1401
}
1408
1402
1409
1403
/**
0 commit comments