ECITest
extends DataInterfaceTestAbstract
in package
Tests the ECI class
Table of Contents
- $FQN : string
- $QRData : QRData
- $testdata : string
- $testCharset : int
- eciCharsetIdProvider() : array<string|int, mixed>
- maskPatternProvider() : array<string|int, array<string|int, int>>
- stringValidateProvider() : array<string|int, mixed>
- testBinaryStringInvalid() : void
- Tests if a binary string is properly validated as false
- testCodeLengthOverflowException() : void
- Tests if an exception is thrown on data overflow
- testConvertUnknownEncoding() : void
- Tests detection of an unknown character set
- testDataModeInstance() : void
- Verifies the QRDataModeInterface instance
- 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
- Tests decoding a data segment from a given BitBuffer
- testGetMinimumVersion() : void
- Tests getting the minimum QR version for the given data
- testGetMinimumVersionException() : void
- Tests if an exception is thrown when the data exceeds the maximum version while auto-detecting
- testInitMatrix() : void
- Tests initializing the data matrix
- testInstance() : void
- Verifies the QRData instance
- testInvalidDataException() : void
- Tests if an exception is thrown when an invalid character is encountered
- 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
- testValidateString() : void
- Tests if a string is properly validated for the respective data mode
- 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
$FQN
protected
string
$FQN
= \chillerlan\QRCode\Data\ECI::class
$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> —maskPatternProvider()
public
static maskPatternProvider() : array<string|int, array<string|int, int>>
Tags
Return values
array<string|int, array<string|int, int>> —stringValidateProvider()
public
static stringValidateProvider() : array<string|int, mixed>
Return values
array<string|int, mixed> —testBinaryStringInvalid()
Tests if a binary string is properly validated as false
public
testBinaryStringInvalid() : void
Tags
Return values
void —testCodeLengthOverflowException()
Tests if an exception is thrown on data overflow
public
testCodeLengthOverflowException() : void
Tags
Return values
void —testConvertUnknownEncoding()
Tests detection of an unknown character set
public
testConvertUnknownEncoding(int $id, string $data) : void
Parameters
- $id : int
- $data : string
Tags
Return values
void —testDataModeInstance()
Verifies the QRDataModeInterface instance
public
testDataModeInstance() : void
Tags
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()
Tests decoding a data segment from a given BitBuffer
public
testDecodeSegment(int $version) : void
Parameters
- $version : int
Tags
Return values
void —testGetMinimumVersion()
Tests getting the minimum QR version for the given data
public
testGetMinimumVersion() : void
Tags
Return values
void —testGetMinimumVersionException()
Tests if an exception is thrown when the data exceeds the maximum version while auto-detecting
public
testGetMinimumVersionException() : void
Tags
Return values
void —testInitMatrix()
Tests initializing the data matrix
public
testInitMatrix(int $maskPattern) : void
Parameters
- $maskPattern : int
Tags
Return values
void —testInstance()
Verifies the QRData instance
public
testInstance() : void
Return values
void —testInvalidDataException()
Tests if an exception is thrown when an invalid character is encountered
public
testInvalidDataException() : void
Tags
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
Return values
void —testReadWrite()
public
testReadWrite(int $id, int $lengthInBits) : void
Parameters
- $id : int
- $lengthInBits : int
Tags
Return values
void —testValidateString()
Tests if a string is properly validated for the respective data mode
public
testValidateString(string $string, bool $expected) : void
Parameters
- $string : string
- $expected : bool
Tags
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>