/** * @return void */ public function testCleanExpiredRecords() { $timestamp = time(); $this->passwordResetRequestEventCollectionFactoryMock->expects($this->once())->method('create')->willReturn($this->passwordResetRequestEventCollectionMock); $this->securityConfigMock->expects($this->once())->method('getCurrentTimestamp')->willReturn($timestamp); $this->passwordResetRequestEventCollectionMock->expects($this->once())->method('deleteRecordsOlderThen')->with($timestamp - \Magento\Security\Model\SecurityManager::SECURITY_CONTROL_RECORDS_LIFE_TIME)->willReturnSelf(); $this->model->cleanExpiredRecords(); }