From e2c1ab0ad2e823179313d0a75f9b6b7edc761794 Mon Sep 17 00:00:00 2001 From: smiley Date: Thu, 2 Mar 2023 19:11:00 +0100 Subject: [PATCH] :octocat: update multimode reader test to include hanzi mode --- tests/QRCodeReaderTestAbstract.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/QRCodeReaderTestAbstract.php b/tests/QRCodeReaderTestAbstract.php index 6d9da519b..421499435 100644 --- a/tests/QRCodeReaderTestAbstract.php +++ b/tests/QRCodeReaderTestAbstract.php @@ -89,25 +89,27 @@ abstract class QRCodeReaderTestAbstract extends TestCase{ $this::assertSame($expected, (string)$result); } - public function testReaderMultiSegment():void{ + public function testReaderMultiMode():void{ $this->options->outputType = QROutputInterface::GDIMAGE_PNG; $this->options->imageBase64 = false; $numeric = '123456789012345678901234567890'; $alphanum = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'; - $kanji = '茗荷茗荷茗荷茗荷'; + $kanji = '漂う花の香り'; + $hanzi = '无可奈何燃花作香'; $byte = 'https://smiley.codes/qrcode/'; $qrcode = (new QRCode($this->options)) ->addNumericSegment($numeric) ->addAlphaNumSegment($alphanum) ->addKanjiSegment($kanji) + ->addHanziSegment($hanzi) ->addByteSegment($byte) ; $result = $qrcode->readFromBlob($qrcode->render()); - $this::assertSame($numeric.$alphanum.$kanji.$byte, $result->data); + $this::assertSame($numeric.$alphanum.$kanji.$hanzi.$byte, $result->data); } public function dataTestProvider():Generator{