Skip to content

Commit

Permalink
:octocat: allow for ECI encoded numeric and alphanum segments (test fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Nov 16, 2024
1 parent 1d8b7fd commit 98f1859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Data/ECITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use chillerlan\QRCode\QROptions;
use chillerlan\QRCode\Common\{BitBuffer, ECICharset, Mode};
use chillerlan\QRCode\Data\{Byte, ECI, Number, QRCodeDataException, QRData, QRDataModeInterface};
use chillerlan\QRCode\Data\{Byte, ECI, Hanzi, QRCodeDataException, QRData, QRDataModeInterface};
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

Expand Down Expand Up @@ -129,7 +129,7 @@ public function testDecodeECISegmentFollowedByInvalidModeException():void{
/** @var \chillerlan\QRCode\Data\QRDataModeInterface[] $segments */
$segments = $this->getDataSegments();
// follow the ECI segment by a non-8bit-byte segment
$segments[1] = new Number('1');
$segments[1] = new Hanzi(self::testData);
$bitBuffer = (new QRData($options, $segments))->getBitBuffer();
// verify the ECI mode indicator
$this::assertSame(Mode::ECI, $bitBuffer->read(4));
Expand Down

0 comments on commit 98f1859

Please sign in to comment.