config = $this->createMock(IConfig::class); $this->cmd = new ClearLostPasswordTokensCommand( $this->config ); } public function testProcess(): void { $data = $this->getLoggedInLoginData(); $this->user->expects($this->once()) ->method('getUID') ->willReturn($this->username); $this->config->expects($this->once()) ->method('deleteUserValue') ->with( $this->username, 'core', 'lostpassword' ); $result = $this->cmd->process($data); $this->assertTrue($result->isSuccess()); } }