mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-10 05:46:01 +00:00
:octocat: added authenticator example
This commit is contained in:
+12
-3
@@ -11,9 +11,9 @@
|
||||
|
||||
namespace chillerlan\QRCodeTest;
|
||||
|
||||
use chillerlan\QRCode\Output\QRString;
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
use chillerlan\GoogleAuth\Authenticator;
|
||||
use chillerlan\QRCode\Output\{QRImage, QRImageOptions, QRString};
|
||||
use chillerlan\QRCode\{QRCode, QROptions};
|
||||
use ReflectionClass;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
@@ -106,4 +106,13 @@ class QRCodeTest extends TestCase{
|
||||
$method->invoke($this->reflectionClass->newInstanceArgs(['ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:', $this->output, $this->options]));
|
||||
}
|
||||
|
||||
public function testAuthenticatorExample(){
|
||||
$authenticator = new Authenticator;
|
||||
|
||||
$data = $authenticator->getUri($authenticator->createSecret(), 'test', 'chillerlan.net');
|
||||
$qrcode = $this->reflectionClass->newInstanceArgs([$data, new QRImage(new QRImageOptions(['type' => QRCode::OUTPUT_IMAGE_GIF]))]);
|
||||
|
||||
$this->markTestSkipped(print_r($qrcode->output(), true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user