annotate methods to cover

Cette révision appartient à :
Daniel Seifert 2022-09-28 22:25:51 +02:00 révisé par Daniel Seifert
Parent 9c4e7cfcc3
révision de75b77562
Signé par: DanielS
ID de la clé GPG: 8A7C4C6ED1915C6F
15 fichiers modifiés avec 188 ajouts et 36 suppressions

Voir le fichier

@ -6,7 +6,6 @@
convertNoticesToExceptions="false"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"

Voir le fichier

@ -47,6 +47,8 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::render
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::getViewDataElement
*/
public function canRenderNoSelectedUser()
{
@ -72,6 +74,8 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::render
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::getViewDataElement
*/
public function canRenderSelectedUser()
{
@ -109,6 +113,8 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::render
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::getViewDataElement
*/
public function canRenderUnloadableUser()
{
@ -156,6 +162,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::getUserObject
*/
public function getUserObjectReturnsRightInstance()
{
@ -171,6 +178,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::getTotpObject
*/
public function getTotpObjectReturnsRightInstance()
{
@ -186,6 +194,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::getBackupcodeListObject
*/
public function getBackupCodeListObjectReturnsRightInstance()
{
@ -201,6 +210,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::save
*/
public function cantSaveBecauseOfNotVerifiable()
{
@ -250,6 +260,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::save
*/
public function cantSaveBecauseExistingRegistration()
{
@ -299,6 +310,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::save
*/
public function canSave()
{
@ -352,6 +364,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::save
*/
public function canSaveWithKnownOXID()
{
@ -410,6 +423,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::getBackupCodes
*/
public function canSetAndGetBackupCodes()
{
@ -428,6 +442,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @te__st
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::delete
*/
public function cantDeleteIfNotSetOxid()
{
@ -455,6 +470,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::delete
*/
public function canDelete()
{
@ -488,6 +504,7 @@ class d3user_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\Admin\d3user_totp::getAvailableBackupCodeCount
*/
public function canGetAvailableBackupCodeCount()
{

Voir le fichier

@ -47,6 +47,8 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::render
* @covers \D3\Totp\Application\Controller\d3_account_totp::getViewDataElement
*/
public function renderReturnsDefaultTemplate()
{
@ -76,6 +78,8 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::render
* @covers \D3\Totp\Application\Controller\d3_account_totp::getViewDataElement
*/
public function renderReturnsLoginTemplateIfNotLoggedIn()
{
@ -99,6 +103,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::getBackupCodes
*/
public function canSetAndGetBackupCodes()
{
@ -117,6 +122,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::getBackupCodeListObject
*/
public function canGetBackupCodeListReturnsRightInstance()
{
@ -132,6 +138,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::getAvailableBackupCodeCount
*/
public function canGetAvailableBackupCodeCount()
{
@ -165,6 +172,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::create
*/
public function cantCreateIfTotpNotActive()
{
@ -184,6 +192,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::create
*/
public function cantCreateIfTotpNotVerfiable()
{
@ -237,6 +246,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::create
*/
public function canCreate()
{
@ -293,6 +303,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::delete
*/
public function cantDeleteIfTotpActive()
{
@ -312,6 +323,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::delete
*/
public function cantDeleteIfNoUser()
{
@ -342,6 +354,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::delete
*/
public function canDelete()
{
@ -379,6 +392,7 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3_account_totp::getTotpObject
*/
public function getTotpObjectReturnsRightObject()
{

Voir le fichier

@ -50,6 +50,7 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::render
*/
public function renderRedirectIfNoTotp()
{
@ -73,6 +74,7 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::render
*/
public function renderDontRedirect()
{
@ -101,6 +103,7 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::getUtils
*/
public function getUtilsReturnsRightInstance()
{
@ -116,6 +119,7 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::getBackupCodeCountMessage
*/
public function getBackupCodeCountMessageReturnMessage()
{
@ -145,6 +149,7 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::getBackupCodeCountMessage
*/
public function getBackupCodeCountMessageReturnNoMessage()
{
@ -170,6 +175,7 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::getBackupCodeListObject
*/
public function getBackupCodeListObjectReturnsRightInstance()
{
@ -182,6 +188,7 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::getPreviousClass
*/
public function canGetPreviousClass()
{
@ -197,12 +204,15 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::previousClassIsOrderStep
* @dataProvider classIsOrderStepDataProvider
*/
public function orderClassIsOrderStep()
public function classIsOrderStep($className, $expected)
{
Registry::getSession()->setVariable(d3totp::TOTP_SESSION_CURRENTCLASS, 'order');
Registry::getSession()->setVariable(d3totp::TOTP_SESSION_CURRENTCLASS, $className);
$this->assertTrue(
$this->assertSame(
$expected,
$this->callMethod(
$this->_oController,
'previousClassIsOrderStep'
@ -211,46 +221,28 @@ class d3totploginTest extends d3TotpUnitTestCase
}
/**
* @test
* @throws ReflectionException
* @return array[]
*/
public function startClassIsNoOrderStep()
public function classIsOrderStepDataProvider(): array
{
Registry::getSession()->setVariable(d3totp::TOTP_SESSION_CURRENTCLASS, 'start');
$this->assertFalse(
$this->callMethod(
$this->_oController,
'previousClassIsOrderStep'
)
);
return [
'order step class' => ['order', true],
'no order step class' => ['start', false],
];
}
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::previousClassIsOrderStep
* @dataProvider classIsOrderStepDataProvider
*/
public function getIsOrderStepIsSameLikeOrderClass()
public function getIsOrderStepIsSameLikeOrderClass($className, $expected)
{
Registry::getSession()->setVariable(d3totp::TOTP_SESSION_CURRENTCLASS, 'order');
Registry::getSession()->setVariable(d3totp::TOTP_SESSION_CURRENTCLASS, $className);
$this->assertTrue(
$this->callMethod(
$this->_oController,
'getIsOrderStep'
)
);
}
/**
* @test
* @throws ReflectionException
*/
public function getIsOrderStepIsSameLikeStartClass()
{
Registry::getSession()->setVariable(d3totp::TOTP_SESSION_CURRENTCLASS, 'start');
$this->assertFalse(
$this->assertSame(
$expected,
$this->callMethod(
$this->_oController,
'getIsOrderStep'
@ -261,6 +253,7 @@ class d3totploginTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Controller\d3totplogin::getBreadCrumb
*/
public function canGetBreadCrumb()
{

Voir le fichier

@ -42,6 +42,7 @@ class d3totp_wrongOtpExceptionTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\Exceptions\d3totp_wrongOtpException::getMessage
*/
public function constructorHasRightDefaultMessage()
{

Voir le fichier

@ -42,6 +42,7 @@ class d3RandomGeneratorTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3RandomGenerator::getRandomTotpBackupCode
*/
public function getRandomTotpBackupCodeReturnsRightCode()
{

Voir le fichier

@ -46,6 +46,7 @@ class d3backupcodeTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcode::generateCode
*/
public function generateCodePass()
{
@ -77,6 +78,7 @@ class d3backupcodeTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcode::getRandomTotpBackupCode
*/
public function getRandomTotpBackupCodePass()
{
@ -89,6 +91,7 @@ class d3backupcodeTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcode::d3EncodeBC
*/
public function d3EncodeBCPass()
{
@ -121,6 +124,7 @@ class d3backupcodeTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcode::d3GetUser
*/
public function d3GetUserReturnCachedUser()
{
@ -145,6 +149,7 @@ class d3backupcodeTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcode::d3GetUser
*/
public function d3GetUserReturnCurrentUser()
{
@ -164,6 +169,7 @@ class d3backupcodeTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcode::d3GetUserObject
*/
public function d3getUserObjectReturnsRightInstance()
{

Voir le fichier

@ -48,6 +48,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::generateBackupCodes
*/
public function generateBackupCodes()
{
@ -89,6 +90,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::getD3BackupCodeObject
*/
public function getD3BackupCodeObjectReturnsRightObject()
{
@ -101,6 +103,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::d3GetConfig
*/
public function d3GetConfigReturnsRightObject()
{
@ -113,6 +116,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::save
*/
public function savePass()
{
@ -140,6 +144,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::getBaseObject
*/
public function getBaseObjectReturnsRightObject()
{
@ -152,6 +157,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::verify
*/
public function verifyFoundTotp()
{
@ -202,6 +208,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::verify
*/
public function verifyNotFoundTotp()
{
@ -252,6 +259,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::d3GetDb
*/
public function d3GetDbReturnsRightInstance()
{
@ -264,6 +272,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::deleteAllFromUser
*/
public function deleteAllFromUserCodesFound()
{
@ -308,6 +317,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::deleteAllFromUser
*/
public function deleteAllFromUserNoCodesFound()
{
@ -350,6 +360,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::getAvailableCodeCount
*/
public function getAvailableCodeCountPass()
{
@ -383,6 +394,7 @@ class d3backupcodelistTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3backupcodelist::d3GetUser
*/
public function d3GetUserReturnsRightInstance()
{

Voir le fichier

@ -52,6 +52,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::__construct
*/
public function constructCallsInit()
{
@ -69,6 +70,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::loadByUserId
*/
public function loadByUserIdTableNotExist()
{
@ -97,6 +99,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::loadByUserId
*/
public function loadByUserIdTableExist()
{
@ -128,6 +131,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getUser
*/
public function getUserFromMember()
{
@ -160,6 +164,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getUser
*/
public function getUserFromObject()
{
@ -192,6 +197,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::checkIfAlreadyExist
*/
public function checkIfAlreadyExistPass()
{
@ -222,6 +228,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::d3GetDb
*/
public function d3GetDbReturnsRightInstance()
{
@ -234,6 +241,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::d3GetUser
*/
public function d3GetUserReturnsRightInstance()
{
@ -246,6 +254,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::isActive
*/
public function isActivePass()
{
@ -267,6 +276,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::isActive
*/
public function isActiveFailedBecauseNoTotpUse()
{
@ -288,6 +298,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::isActive
*/
public function isActiveFailedBecauseConfigParam()
{
@ -309,6 +320,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::isActive
*/
public function isActiveFailedBecauseNoTotpUseAndConfigParam()
{
@ -330,6 +342,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::UserUseTotp
*/
public function UserUseTotpPass()
{
@ -349,6 +362,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::UserUseTotp
*/
public function UserUseTotpNoTotp()
{
@ -368,6 +382,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::UserUseTotp
*/
public function UserUseTotpNoSeed()
{
@ -387,6 +402,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::UserUseTotp
*/
public function UserUseTotpNoTotpAndNoSeed()
{
@ -406,6 +422,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getSavedSecret
*/
public function getSavedSecretExistingSeed()
{
@ -430,6 +447,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getSavedSecret
*/
public function getSavedSecretNoSeed()
{
@ -453,6 +471,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getSavedSecret
*/
public function getSavedSecretCantDecrypt()
{
@ -476,6 +495,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getTotp
*/
public function getTotpReturnsCachedObject()
{
@ -495,6 +515,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getTotp
*/
public function getTotpReturnsNewObject()
{
@ -527,6 +548,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getTotp
*/
public function getTotpReturnsNewObjectNoUserGivenSeed()
{
@ -561,6 +583,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getQrCodeElement
*/
public function getQrCodeElement()
{
@ -589,6 +612,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::d3GetWriter
*/
public function d3GetWriterReturnsRightInstance()
{
@ -603,6 +627,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::getSecret
*/
public function getSecretPass()
{
@ -626,6 +651,8 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::saveSecret
* @covers \D3\Totp\Application\Model\d3totp::getFieldData
*/
public function saveSecretPass()
{
@ -647,6 +674,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::verify
*/
public function verifyPass()
{
@ -672,6 +700,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::verify
*/
public function verifyBackupCodePass()
{
@ -707,6 +736,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::verify
*/
public function verifyFailed()
{
@ -742,6 +772,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::verify
*/
public function verifyWithSeedFailed()
{
@ -777,6 +808,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::d3GetBackupCodeListObject
*/
public function d3GetBackupCodeListObjectReturnsRightInstance()
{
@ -789,6 +821,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::encrypt
*/
public function encryptDecryptPass()
{
@ -804,6 +837,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::decrypt
*/
public function decryptPass()
{
@ -819,6 +853,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::decrypt
*/
public function decryptFailed()
{
@ -844,6 +879,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::d3Base64_decode
*/
public function d3Base64_decodePass()
{
@ -856,6 +892,7 @@ class d3totpTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Application\Model\d3totp::delete
*/
public function deletePass()
{

Voir le fichier

@ -53,6 +53,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::login_noredirect
*/
public function login_noredirectFailsIfNoUserLoggedIn()
{
@ -93,6 +94,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::login_noredirect
*/
public function login_noredirectFailTotpNotActive()
{
@ -145,6 +147,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::login_noredirect
*/
public function login_noredirectPass()
{
@ -200,6 +203,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::d3GetTotpObject
*/
public function d3GetTotpObjectReturnsRightInstance()
{
@ -212,6 +216,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::checkTotplogin
*/
public function checkTotploginNoTotpLogin()
{
@ -247,6 +252,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::checkTotplogin
*/
public function checkTotploginUnvalidTotp()
{
@ -295,6 +301,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::checkTotplogin
*/
public function checkTotploginValidTotp()
{
@ -337,6 +344,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::d3GetUtilsView
*/
public function d3GetUtilsViewReturnsRightInstance()
{
@ -349,6 +357,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::cancelTotpLogin
*/
public function canCancelTotpLogin()
{
@ -366,6 +375,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::isNoTotpOrNoLogin
*/
public function isNoTotpOrNoLoginTrueNoSessionVariable()
{
@ -386,6 +396,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::isNoTotpOrNoLogin
*/
public function isNoTotpOrNoLoginTrueTotpNotActive()
{
@ -406,6 +417,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::isNoTotpOrNoLogin
*/
public function isNoTotpOrNoLoginFalse()
{
@ -426,6 +438,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::hasValidTotp
*/
public function hasValidTotpTrueSessionVarname()
{
@ -446,6 +459,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::hasValidTotp
*/
public function hasValidTotpTrueValidTotp()
{
@ -466,6 +480,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::hasValidTotp
*/
public function hasValidTotpFalseMissingTotp()
{
@ -486,6 +501,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::hasValidTotp
*/
public function hasValidTotpFalseUnverifiedTotp()
{
@ -506,6 +522,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::d3TotpRelogin
*/
public function d3TotpReloginPass()
{
@ -543,6 +560,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::d3TotpClearSessionVariables
*/
public function d3TotpClearSessionVariablesPass()
{
@ -566,6 +584,7 @@ class d3_totp_UserComponentTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Component\d3_totp_UserComponent::d3GetSession
*/
public function d3GetSessionReturnsRightInstance()
{

Voir le fichier

@ -50,6 +50,8 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::render
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::getViewDataElement
*/
public function canRenderNoAuth()
{
@ -93,6 +95,8 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::render
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::getViewDataElement
*/
public function canRenderTotpNotActive()
{
@ -136,6 +140,8 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::render
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::getViewDataElement
*/
public function canRenderInTotpLoginProcess()
{
@ -179,6 +185,8 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::render
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::getViewDataElement
*/
public function canRenderRequestTotp()
{
@ -222,6 +230,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::d3GetTotpObject
*/
public function d3GetTotpObjectReturnsRightObject()
{
@ -234,6 +243,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::d3GetBackupCodeListObject
*/
public function d3GetBackupCodeListObjectReturnsRightObject()
{
@ -246,6 +256,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::d3GetUtilsView
*/
public function d3GetUtilsViewReturnsRightObject()
{
@ -258,6 +269,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::d3GetSession
*/
public function d3GetSessionReturnsRightObject()
{
@ -270,6 +282,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::checklogin
*/
public function checkloginNoTotp()
{
@ -306,6 +319,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::checklogin
*/
public function checkloginInvalidTotp()
{
@ -352,6 +366,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::checklogin
*/
public function checkloginValidTotp()
{
@ -398,6 +413,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::getBackupCodeCountMessage
*/
public function getBackupCodeCountMessageShowMessage()
{
@ -427,6 +443,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::getBackupCodeCountMessage
*/
public function getBackupCodeCountMessageDontShowMessage()
{
@ -452,6 +469,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::isNoTotpOrNoLogin
*/
public function isNoTotpOrNoLoginIsAuth()
{
@ -484,6 +502,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::isNoTotpOrNoLogin
*/
public function isNoTotpOrNoLoginTotpNotActive()
{
@ -516,6 +535,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::isNoTotpOrNoLogin
*/
public function isNoTotpOrNoLoginPass()
{
@ -548,6 +568,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::hasValidTotp
*/
public function hasValidTotpTrueSessionVarname()
{
@ -568,6 +589,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::hasValidTotp
*/
public function hasValidTotpTrueValidTotp()
{
@ -588,6 +610,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::hasValidTotp
*/
public function hasValidTotpFalseMissingTotp()
{
@ -608,6 +631,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::hasValidTotp
*/
public function hasValidTotpFalseUnverifiedTotp()
{
@ -628,6 +652,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::d3CancelLogin
*/
public function d3CancelLoginPass()
{
@ -651,6 +676,7 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\Admin\d3_totp_LoginController::d3GetUserObject
*/
public function d3GetUserObjectReturnsRightObject()
{

Voir le fichier

@ -25,6 +25,9 @@ trait d3_totp_getUserTestTrait
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_OrderController::getUser
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_PaymentController::getUser
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_UserController::getUser
*/
public function getUserHasNoUser()
{
@ -44,6 +47,9 @@ trait d3_totp_getUserTestTrait
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_OrderController::getUser
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_PaymentController::getUser
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_UserController::getUser
*/
public function getUserTotpNotActive()
{
@ -93,6 +99,9 @@ trait d3_totp_getUserTestTrait
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_OrderController::getUser
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_PaymentController::getUser
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_UserController::getUser
*/
public function getUserTotpFinished()
{
@ -141,6 +150,9 @@ trait d3_totp_getUserTestTrait
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_OrderController::getUser
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_PaymentController::getUser
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_UserController::getUser
*/
public function getUserTotpNotFinished()
{
@ -189,6 +201,9 @@ trait d3_totp_getUserTestTrait
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_OrderController::d3GetTotpObject
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_PaymentController::d3GetTotpObject
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_UserController::d3GetTotpObject
*/
public function d3GetTotpObjectReturnsRightObject()
{
@ -201,6 +216,9 @@ trait d3_totp_getUserTestTrait
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_OrderController::d3GetSessionObject
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_PaymentController::d3GetSessionObject
* @covers \D3\Totp\Modules\Application\Controller\d3_totp_UserController::d3GetSessionObject
*/
public function d3GetSessionObjectReturnsRightObject()
{

Voir le fichier

@ -46,6 +46,7 @@ class d3_totp_userTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Model\d3_totp_user::logout
*/
public function logout()
{
@ -74,6 +75,7 @@ class d3_totp_userTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Model\d3_totp_user::d3getTotp
*/
public function d3getTotpReturnsRightInstance()
{
@ -86,6 +88,7 @@ class d3_totp_userTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Application\Model\d3_totp_user::d3GetSession
*/
public function d3GetSessionReturnsRightInstance()
{

Voir le fichier

@ -47,6 +47,7 @@ class d3_totp_utilsTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Core\d3_totp_utils::checkAccessRights
*/
public function checkAccessRightsNoAuth()
{
@ -79,6 +80,7 @@ class d3_totp_utilsTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Core\d3_totp_utils::checkAccessRights
*/
public function checkAccessRightsTotpNotActive()
{
@ -115,6 +117,7 @@ class d3_totp_utilsTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Core\d3_totp_utils::checkAccessRights
*/
public function checkAccessRightsTotpFinished()
{
@ -161,6 +164,7 @@ class d3_totp_utilsTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Core\d3_totp_utils::checkAccessRights
*/
public function checkAccessRightsTotpUnfinished()
{
@ -211,6 +215,7 @@ class d3_totp_utilsTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Core\d3_totp_utils::d3GetSessionObject
*/
public function d3GetSessionObjectReturnsRightInstance()
{
@ -223,6 +228,7 @@ class d3_totp_utilsTest extends d3TotpUnitTestCase
/**
* @test
* @throws ReflectionException
* @covers \D3\Totp\Modules\Core\d3_totp_utils::d3GetTotpObject
*/
public function d3GetTotpObjectReturnsRightInstance()
{

Voir le fichier

@ -27,14 +27,14 @@ class InstallationTest extends d3TotpUnitTestCase
/**
* setup basic requirements
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->_oModel = oxNew(Installation::class);
}
public function tearDown()
public function tearDown(): void
{
parent::tearDown();