Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Add test for secret code generation
Browse files Browse the repository at this point in the history
  • Loading branch information
scheb committed Feb 15, 2020
1 parent 1e450e1 commit 6393d30
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,13 @@ public function getQRContent_getContentForQrCode_returnUri(): void
$returnValue = $this->authenticator->getQRContent($this->user);
$this->assertEquals('QRCodeContent', $returnValue);
}

/**
* @test
*/
public function generateSecret_getRandomSecretCode_returnString(): void
{
$returnValue = $this->authenticator->generateSecret();
$this->assertEquals(52, strlen($returnValue));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,13 @@ public function getProvisioningUri_getContentForQrCode_returnUri(): void
$returnValue = $this->authenticator->getQRContent($this->user);
$this->assertEquals('provisioningUri', $returnValue);
}

/**
* @test
*/
public function generateSecret_getRandomSecretCode_returnString(): void
{
$returnValue = $this->authenticator->generateSecret();
$this->assertEquals(52, strlen($returnValue));
}
}

0 comments on commit 6393d30

Please sign in to comment.