fix the testsDependency folder

This commit is contained in:
Nicolas CARPi
2022-12-07 23:29:04 +01:00
parent db0515e826
commit f1e73aab3a
2 changed files with 10 additions and 8 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
namespace TestsDependency;
use PHPUnit\Framework\TestCase;
use RobThree\Auth\Algorithm;
use RobThree\Auth\Providers\Qr\EndroidQrCodeProvider;
use RobThree\Auth\Providers\Qr\HandlesDataUri;
use RobThree\Auth\TwoFactorAuth;
@@ -11,10 +12,10 @@ class EndroidQRCodeTest extends TestCase
{
use HandlesDataUri;
public function testDependency()
public function testDependency(): void
{
$qr = new EndroidQrCodeProvider();
$tfa = new TwoFactorAuth('Test&Issuer', 6, 30, 'sha1', $qr);
$tfa = new TwoFactorAuth('Test&Issuer', 6, 30, Algorithm::Sha1, $qr);
$data = $this->DecodeDataUri($tfa->getQRCodeImageAsDataUri('Test&Label', 'VMR466AB62ZBOKHE'));
$this->assertEquals('image/png', $data['mimetype']);
$this->assertEquals('base64', $data['encoding']);