Documentation

ECITest extends TestCase
in package

FinalYes

Tests the ECI class

Table of Contents

Constants

testData  = '无可奈何燃花作香'

Properties

$QRData  : QRData
$testCharset  : int

Methods

convertUnknownEncoding()  : void
Tests detection of an unknown character set
decodeECISegmentFollowedByInvalidModeException()  : void
Tests if and exception is thrown when the ECI segment is followed by a mode that is not 8-bit byte
decodeSegment()  : void
eciCharsetIdProvider()  : array<string|int, mixed>
invalidDataException()  : void
invalidDataOnEmptyException()  : void
since the ECI class only accepts integer values, we'll use this test to check for the upper end of the accepted input range
readWrite()  : void
unknownEncodingDataProvider()  : array<string|int, mixed>
versionBreakpointProvider()  : array<string|int, mixed>
returns versions within the version breakpoints 1-9, 10-26 and 27-40
setUp()  : void
getDataSegments()  : array<string|int, mixed>

Constants

testData

private mixed testData = '无可奈何燃花作香'

Properties

$testCharset

private int $testCharset = \chillerlan\QRCode\Common\ECICharset::GB18030

Methods

convertUnknownEncoding()

Tests detection of an unknown character set

public convertUnknownEncoding(int $id, string $data) : void
Parameters
$id : int
$data : string
Attributes
#[DataProvider]
'unknownEncodingDataProvider'
#[Test]

decodeECISegmentFollowedByInvalidModeException()

Tests if and exception is thrown when the ECI segment is followed by a mode that is not 8-bit byte

public decodeECISegmentFollowedByInvalidModeException() : void
Attributes
#[Test]

decodeSegment()

public decodeSegment(int $version) : void
Parameters
$version : int
Attributes
#[DataProvider]
'versionBreakpointProvider'
#[Test]

eciCharsetIdProvider()

public static eciCharsetIdProvider() : array<string|int, mixed>
Tags
phpstan-return

array<int, array{0: int, 1: int}>

Return values
array<string|int, mixed>

invalidDataException()

public invalidDataException() : void
Attributes
#[Test]

invalidDataOnEmptyException()

since the ECI class only accepts integer values, we'll use this test to check for the upper end of the accepted input range

public invalidDataOnEmptyException() : void
Attributes
#[Test]

readWrite()

public readWrite(int $id, int $lengthInBits) : void
Parameters
$id : int
$lengthInBits : int
Attributes
#[DataProvider]
'eciCharsetIdProvider'
#[Test]

unknownEncodingDataProvider()

public static unknownEncodingDataProvider() : array<string|int, mixed>
Tags
phpstan-return

array<string, array{0: int, 1: string}>

Return values
array<string|int, mixed>

versionBreakpointProvider()

returns versions within the version breakpoints 1-9, 10-26 and 27-40

public static versionBreakpointProvider() : array<string|int, mixed>
Tags
phpstan-return

array<string, array{0: int}>

Return values
array<string|int, mixed>

getDataSegments()

private getDataSegments() : array<string|int, mixed>
Tags
phpstan-return

array{0: ECI, 1: Byte}

Return values
array<string|int, mixed>

        
On this page

Search results