Documentation

ECITest extends TestCase
in package

Tests the ECI class

Table of Contents

$QRData  : QRData
$testdata  : string
$testCharset  : int
eciCharsetIdProvider()  : array<string|int, mixed>
testConvertUnknownEncoding()  : void
Tests detection of an unknown character set
testDataModeInstance()  : void
testDecodeECISegmentFollowedByInvalidModeException()  : void
Tests if and exception is thrown when the ECI segment is followed by a mode that is not 8-bit byte
testDecodeSegment()  : void
testInvalidDataException()  : void
testInvalidDataOnEmptyException()  : 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
testReadWrite()  : 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>

Properties

$testdata

protected string $testdata = '无可奈何燃花作香'

$testCharset

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

Methods

eciCharsetIdProvider()

public static eciCharsetIdProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

testConvertUnknownEncoding()

Tests detection of an unknown character set

public testConvertUnknownEncoding(int $id, string $data) : void
Parameters
$id : int
$data : string
Tags
dataProvider

unknownEncodingDataProvider

Return values
void

testDataModeInstance()

public testDataModeInstance() : void
Tags
inheritDoc
Return values
void

testDecodeECISegmentFollowedByInvalidModeException()

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

public testDecodeECISegmentFollowedByInvalidModeException() : void
Return values
void

testDecodeSegment()

public testDecodeSegment(int $version) : void
Parameters
$version : int
Tags
inheritDoc
dataProvider

versionBreakpointProvider

Return values
void

testInvalidDataException()

public testInvalidDataException() : void
Tags
inheritDoc
Return values
void

testInvalidDataOnEmptyException()

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 testInvalidDataOnEmptyException() : void
Tags
inheritDoc
Return values
void

testReadWrite()

public testReadWrite(int $id, int $lengthInBits) : void
Parameters
$id : int
$lengthInBits : int
Tags
dataProvider

eciCharsetIdProvider

Return values
void

unknownEncodingDataProvider()

public unknownEncodingDataProvider() : array<string|int, mixed>
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>
Return values
array<string|int, mixed>

setUp()

protected setUp() : void
Return values
void

getDataSegments()

private getDataSegments() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results