summaryrefslogtreecommitdiff
path: root/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php')
-rw-r--r--vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php29
1 files changed, 23 insertions, 6 deletions
diff --git a/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php b/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php
index c29b1f639..10847633c 100644
--- a/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php
+++ b/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php
@@ -12,13 +12,19 @@
namespace chillerlan\QRCodeTest\Data;
-use chillerlan\QRCode\Data\{AlphaNum, QRCodeDataException};
+use chillerlan\QRCode\Data\{AlphaNum, QRCodeDataException, QRDataInterface};
+use chillerlan\QRCode\QROptions;
-class AlphaNumTest extends DatainterfaceTestAbstract{
+/**
+ * Tests the AlphaNum class
+ */
+final class AlphaNumTest extends DatainterfaceTestAbstract{
+
+ /** @internal */
+ protected string $testdata = '0 $%*+-./:';
- protected $FQCN = AlphaNum::class;
- protected $testdata = '0 $%*+-./:';
- protected $expected = [
+ /** @internal */
+ protected array $expected = [
32, 80, 36, 212, 252, 15, 175, 251,
176, 236, 17, 236, 17, 236, 17, 236,
17, 236, 17, 236, 17, 236, 17, 236,
@@ -34,7 +40,18 @@ class AlphaNumTest extends DatainterfaceTestAbstract{
92, 112, 20, 198, 27
];
- public function testGetCharCodeException(){
+ /**
+ * @inheritDoc
+ * @internal
+ */
+ protected function getDataInterfaceInstance(QROptions $options):QRDataInterface{
+ return new AlphaNum($options);
+ }
+
+ /**
+ * Tests if an exception is thrown when an invalid character is encountered
+ */
+ public function testGetCharCodeException():void{
$this->expectException(QRCodeDataException::class);
$this->expectExceptionMessage('illegal char: "#" [35]');