Просмотр исходного кода

:octocat: update multimode reader test to include hanzi mode

smiley 2 лет назад
Родитель
Сommit
e2c1ab0ad2
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      tests/QRCodeReaderTestAbstract.php

+ 5 - 3
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{