:octocat: added authenticator example

This commit is contained in:
smiley
2017-10-25 05:49:32 +02:00
parent f9e7a2eef2
commit 8ef55ec8e8
4 changed files with 41 additions and 17 deletions
+12 -3
View File
@@ -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));
}
}