Add additional assertions for session state in SocialClientRegistrationTest

This commit is contained in:
netkas 2025-03-28 14:52:58 -04:00
parent a7d4e6c2e3
commit 8046b8a8a2
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -76,14 +76,16 @@
$this->assertFalse($rpcClient->getSessionState()->isAuthenticated());
$this->assertTrue($rpcClient->getSessionState()->containsFlag(SessionFlags::AUTHENTICATION_REQUIRED));
$this->assertTrue($rpcClient->getSessionState()->containsFlag(SessionFlags::VER_PASSWORD));
$this->assertFalse($rpcClient->getSessionState()->isAuthenticated());
$this->assertFalse($rpcClient->verificationPasswordAuthentication('IncorrectPassword'));
$this->assertTrue($rpcClient->getSessionState()->containsFlag(SessionFlags::AUTHENTICATION_REQUIRED));
$this->assertTrue($rpcClient->getSessionState()->containsFlag(SessionFlags::VER_PASSWORD));
$this->assertFalse($rpcClient->getSessionState()->isAuthenticated());
}
/**
* @throws DatabaseOperationException
* @throws DatabaseOperationException`
* @throws ResolutionException
* @throws CryptographyException
* @throws RpcException
@ -100,9 +102,11 @@
$this->assertFalse($rpcClient->getSessionState()->isAuthenticated());
$this->assertTrue($rpcClient->getSessionState()->containsFlag(SessionFlags::AUTHENTICATION_REQUIRED));
$this->assertTrue($rpcClient->getSessionState()->containsFlag(SessionFlags::VER_PASSWORD));
$this->assertFalse($rpcClient->getSessionState()->isAuthenticated());
$this->assertTrue($rpcClient->verificationPasswordAuthentication('SecuredTestingPassword123'));
$this->assertFalse($rpcClient->getSessionState()->containsFlag(SessionFlags::AUTHENTICATION_REQUIRED));
$this->assertFalse($rpcClient->getSessionState()->containsFlag(SessionFlags::VER_PASSWORD));
$this->assertTrue($rpcClient->getSessionState()->isAuthenticated());
}
}