diff options
author | Andrew Dolgov <[email protected]> | 2021-02-26 19:16:17 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-26 19:16:17 +0300 |
commit | 3fd785654372d493c031d9b541ab33a881023a32 (patch) | |
tree | 0a76cb410217074378de3d7012b95754cd3c7e6f /vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php | |
parent | bc4475b6698f5a74e475674aa7af43253c459892 (diff) |
* switch to composer for qrcode and otp dependencies
* move most OTP-related stuff into userhelper
* remove old phpqrcode and otphp libraries
Diffstat (limited to 'vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php')
-rw-r--r-- | vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php b/vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php new file mode 100644 index 000000000..108b8fed7 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php @@ -0,0 +1,50 @@ +<?php +/** + * Class KanjiTest + * + * @filesource KanjiTest.php + * @created 24.11.2017 + * @package chillerlan\QRCodeTest\Data + * @author Smiley <[email protected]> + * @copyright 2017 Smiley + * @license MIT + */ + +namespace chillerlan\QRCodeTest\Data; + +use chillerlan\QRCode\Data\{Kanji, QRCodeDataException}; + +class KanjiTest extends DatainterfaceTestAbstract{ + + protected $FQCN = Kanji::class; + protected $testdata = '茗荷茗荷茗荷茗荷茗荷'; + protected $expected = [ + 128, 173, 85, 26, 95, 85, 70, 151, + 213, 81, 165, 245, 84, 105, 125, 85, + 26, 92, 0, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 17, 236, 17, 236, 17, 236, 17, 236, + 195, 11, 221, 91, 141, 220, 163, 46, + 165, 37, 163, 176, 79, 0, 64, 68, + 96, 113, 54, 191 + ]; + + public function testIllegalCharException1(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('illegal char at 1 [16191]'); + + $this->dataInterface->setData('ÃÃ'); + } + + public function testIllegalCharException2(){ + $this->expectException(QRCodeDataException::class); + $this->expectExceptionMessage('illegal char at 1'); + + $this->dataInterface->setData('Ã'); + } +} |