ECITest
extends TestCase
in package
FinalYes
Tests the ECI class
Table of Contents
Properties
- $QRData : QRData
- $testdata : string
- $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>
Properties
$QRData
protected
QRData
$QRData
$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
testDataModeInstance()
public
testDataModeInstance() : void
Tags
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
Tags
testInvalidDataException()
public
testInvalidDataException() : void
Tags
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
testReadWrite()
public
testReadWrite(int $id, int $lengthInBits) : void
Parameters
- $id : int
- $lengthInBits : int
Tags
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
getDataSegments()
private
getDataSegments() : array<string|int, mixed>