File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
app/code/Magento/Security/Test/Unit/Model Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,48 @@ public function testProcessProlong()
255
255
$ this ->model ->processProlong ();
256
256
}
257
257
258
+ /**
259
+ * @return void
260
+ */
261
+ public function testUpdatedAtIsNull ()
262
+ {
263
+ $ newUpdatedAt = '2016-01-01 00:00:30 ' ;
264
+ $ adminSessionInfoId = 50 ;
265
+ $ this ->authSessionMock ->expects ($ this ->any ())
266
+ ->method ('getAdminSessionInfoId ' )
267
+ ->willReturn ($ adminSessionInfoId );
268
+
269
+ $ this ->adminSessionInfoFactoryMock ->expects ($ this ->any ())
270
+ ->method ('create ' )
271
+ ->willReturn ($ this ->currentSessionMock );
272
+
273
+ $ this ->currentSessionMock ->expects ($ this ->once ())
274
+ ->method ('load ' )
275
+ ->willReturnSelf ();
276
+
277
+ $ this ->currentSessionMock ->expects ($ this ->once ())
278
+ ->method ('getUpdatedAt ' )
279
+ ->willReturn (null );
280
+
281
+ $ this ->authSessionMock ->expects ($ this ->once ())
282
+ ->method ('getUpdatedAt ' )
283
+ ->willReturn (strtotime ($ newUpdatedAt ));
284
+
285
+ $ this ->securityConfigMock ->expects ($ this ->once ())
286
+ ->method ('getAdminSessionLifetime ' )
287
+ ->willReturn (100 );
288
+
289
+ $ this ->currentSessionMock ->expects ($ this ->never ())
290
+ ->method ('setData ' )
291
+ ->willReturnSelf ();
292
+
293
+ $ this ->currentSessionMock ->expects ($ this ->never ())
294
+ ->method ('save ' )
295
+ ->willReturnSelf ();
296
+
297
+ $ this ->model ->processProlong ();
298
+ }
299
+
258
300
/**
259
301
* @return void
260
302
*/
You can’t perform that action at this time.
0 commit comments