We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29cd307 commit fd6382bCopy full SHA for fd6382b
app/code/Magento/Security/Test/Unit/Model/AdminSessionInfoTest.php
@@ -127,6 +127,26 @@ public function dataProviderSessionLifetime()
127
];
128
}
129
130
+ /**
131
+ * @return void
132
+ */
133
+ public function testSessionExpiredWhenUpdatedAtIsNull()
134
+ {
135
+ $timestamp = time();
136
+ $sessionLifetime = '1';
137
+
138
+ $this->securityConfigMock->expects($this->once())
139
+ ->method('getAdminSessionLifetime')
140
+ ->willReturn($sessionLifetime);
141
142
+ $this->dateTimeMock->expects($this->once())
143
+ ->method('gmtTimestamp')
144
+ ->willReturn($timestamp);
145
146
+ $this->model->setUpdatedAt(null);
147
+ $this->assertTrue($this->model->isSessionExpired());
148
+ }
149
150
/**
151
* @return void
152
*/
0 commit comments