summaryrefslogtreecommitdiff
path: root/vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php')
-rw-r--r--vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php29
1 files changed, 23 insertions, 6 deletions
diff --git a/vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php b/vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php
index 983346a34..dcd9507ab 100644
--- a/vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php
+++ b/vendor/chillerlan/php-qrcode/tests/Data/NumberTest.php
@@ -12,13 +12,19 @@
namespace chillerlan\QRCodeTest\Data;
-use chillerlan\QRCode\Data\{Number, QRCodeDataException};
+use chillerlan\QRCode\QROptions;
+use chillerlan\QRCode\Data\{Number, QRCodeDataException, QRDataInterface};
-class NumberTest extends DatainterfaceTestAbstract{
+/**
+ * Tests the Number class
+ */
+final class NumberTest extends DatainterfaceTestAbstract{
+
+ /** @internal */
+ protected string $testdata = '0123456789';
- protected $FQCN = Number::class;
- protected $testdata = '0123456789';
- protected $expected = [
+ /** @internal */
+ protected array $expected = [
16, 40, 12, 86, 106, 105, 0, 236,
17, 236, 17, 236, 17, 236, 17, 236,
17, 236, 17, 236, 17, 236, 17, 236,
@@ -34,7 +40,18 @@ class NumberTest extends DatainterfaceTestAbstract{
89, 63, 168, 151
];
- public function testGetCharCodeException(){
+ /**
+ * @inheritDoc
+ * @internal
+ */
+ protected function getDataInterfaceInstance(QROptions $options):QRDataInterface{
+ return new Number($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]');