🛀 data mode rework

This commit is contained in:
codemasher
2020-11-21 02:43:14 +01:00
parent 4968063fb3
commit 9f5d0bc060
26 changed files with 853 additions and 789 deletions
+3 -12
View File
@@ -12,8 +12,7 @@
namespace chillerlan\QRCodeTest\Data;
use chillerlan\QRCode\QROptions;
use chillerlan\QRCode\Data\{Number, QRCodeDataException, QRDataInterface};
use chillerlan\QRCode\Data\{Number, QRCodeDataException};
/**
* Tests the Number class
@@ -21,7 +20,7 @@ use chillerlan\QRCode\Data\{Number, QRCodeDataException, QRDataInterface};
final class NumberTest extends DatainterfaceTestAbstract{
/** @internal */
protected string $testdata = '0123456789';
protected array $testdata = [Number::class, '0123456789'];
/** @internal */
protected array $expected = [
@@ -40,14 +39,6 @@ final class NumberTest extends DatainterfaceTestAbstract{
89, 63, 168, 151
];
/**
* @inheritDoc
* @internal
*/
protected function getDataInterfaceInstance(QROptions $options):QRDataInterface{
return new Number($options);
}
/**
* Tests if an exception is thrown when an invalid character is encountered
*/
@@ -55,7 +46,7 @@ final class NumberTest extends DatainterfaceTestAbstract{
$this->expectException(QRCodeDataException::class);
$this->expectExceptionMessage('illegal char: "#" [35]');
$this->dataInterface->setData('#');
$this->dataInterface->setData([[Number::class, '#']]);
}
}