mirror of
https://github.com/RobThree/TwoFactorAuth.git
synced 2026-10-08 04:45:54 +00:00
address remarks made by MasterOdin
This commit is contained in:
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace TestsDependency;
|
||||
|
||||
use BaconQrCode\Renderer\Image\ImagickImageBackEnd;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use RobThree\Auth\Algorithm;
|
||||
use RobThree\Auth\Providers\Qr\BaconQrCodeProvider;
|
||||
@@ -18,19 +17,12 @@ class BaconQRCodeTest extends TestCase
|
||||
|
||||
public function testDependency(): void
|
||||
{
|
||||
// php < 7.1 will install an older Bacon QR Code
|
||||
if (!class_exists(ImagickImageBackEnd::class)) {
|
||||
$this->expectException(RuntimeException::class);
|
||||
$qr = new BaconQrCodeProvider(1, '#000', '#FFF', 'svg');
|
||||
|
||||
$qr = new BaconQrCodeProvider(1, '#000', '#FFF', 'svg');
|
||||
} else {
|
||||
$qr = new BaconQrCodeProvider(1, '#000', '#FFF', 'svg');
|
||||
$tfa = new TwoFactorAuth('Test&Issuer', 6, 30, Algorithm::Sha1, $qr);
|
||||
|
||||
$tfa = new TwoFactorAuth('Test&Issuer', 6, 30, Algorithm::Sha1, $qr);
|
||||
|
||||
$data = $this->DecodeDataUri($tfa->getQRCodeImageAsDataUri('Test&Label', 'VMR466AB62ZBOKHE'));
|
||||
$this->assertEquals('image/svg+xml', $data['mimetype']);
|
||||
}
|
||||
$data = $this->DecodeDataUri($tfa->getQRCodeImageAsDataUri('Test&Label', 'VMR466AB62ZBOKHE'));
|
||||
$this->assertEquals('image/svg+xml', $data['mimetype']);
|
||||
}
|
||||
|
||||
public function testBadTextColour(): void
|
||||
|
||||
Reference in New Issue
Block a user