ECITest
extends TestCase
in package
FinalYes
Tests the ECI class
Table of Contents
Constants
- testData = '无可奈何燃花作香'
Properties
- $QRData : QRData
- $testCharset : int
Methods
- 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>
Constants
testData
private
mixed
testData
= '无可奈何燃花作香'
Properties
$QRData
private
QRData
$QRData
$testCharset
private
int
$testCharset
= \chillerlan\QRCode\Common\ECICharset::GB18030
Methods
eciCharsetIdProvider()
public
static eciCharsetIdProvider() : array<string|int, mixed>
Tags
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
Attributes
- #[DataProvider]
- 'unknownEncodingDataProvider'
testDataModeInstance()
public
testDataModeInstance() : 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
testDecodeSegment()
public
testDecodeSegment(int $version) : void
Parameters
- $version : int
Attributes
- #[DataProvider]
- 'versionBreakpointProvider'
testInvalidDataException()
public
testInvalidDataException() : 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
testReadWrite()
public
testReadWrite(int $id, int $lengthInBits) : void
Parameters
- $id : int
- $lengthInBits : int
Attributes
- #[DataProvider]
- 'eciCharsetIdProvider'
unknownEncodingDataProvider()
public
static unknownEncodingDataProvider() : array<string|int, mixed>
Tags
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
Return values
array<string|int, mixed>setUp()
protected
setUp() : void
getDataSegments()
private
getDataSegments() : array<string|int, mixed>