session = $this->createMock(ISession::class); $this->cmd = new UpdateLastPasswordConfirmCommand( $this->session ); } public function testProcess(): void { $data = $this->getLoggedInLoginData(); $this->user->expects($this->once()) ->method('getLastLogin') ->willReturn(1234); $this->session->expects($this->once()) ->method('set') ->with( 'last-password-confirm', 1234 ); $result = $this->cmd->process($data); $this->assertTrue($result->isSuccess()); } }