mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-27 18:48:13 +00:00
🛀 data mode rework
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
|
||||
namespace chillerlan\QRCodeTest\Data;
|
||||
|
||||
use chillerlan\QRCode\Data\{AlphaNum, QRCodeDataException, QRDataInterface};
|
||||
use chillerlan\QRCode\QROptions;
|
||||
use chillerlan\QRCode\Data\{AlphaNum, QRCodeDataException};
|
||||
|
||||
/**
|
||||
* Tests the AlphaNum class
|
||||
@@ -21,7 +20,7 @@ use chillerlan\QRCode\QROptions;
|
||||
final class AlphaNumTest extends DatainterfaceTestAbstract{
|
||||
|
||||
/** @internal */
|
||||
protected string $testdata = '0 $%*+-./:';
|
||||
protected array $testdata = [AlphaNum::class, '0 $%*+-./:'];
|
||||
|
||||
/** @internal */
|
||||
protected array $expected = [
|
||||
@@ -40,14 +39,6 @@ final class AlphaNumTest extends DatainterfaceTestAbstract{
|
||||
92, 112, 20, 198, 27
|
||||
];
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @internal
|
||||
*/
|
||||
protected function getDataInterfaceInstance(QROptions $options):QRDataInterface{
|
||||
return new AlphaNum($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if an exception is thrown when an invalid character is encountered
|
||||
*/
|
||||
@@ -55,7 +46,7 @@ final class AlphaNumTest extends DatainterfaceTestAbstract{
|
||||
$this->expectException(QRCodeDataException::class);
|
||||
$this->expectExceptionMessage('illegal char: "#" [35]');
|
||||
|
||||
$this->dataInterface->setData('#');
|
||||
$this->dataInterface->setData([[AlphaNum::class, '#']]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user