# Documentation

Menu

## ECITest extends DataInterfaceTestAbstract
in package

ECITest.php : 20

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

ECITest.php : 22
`protected string $FQN = \chillerlan\QRCode\Data\ECI::class`

#### $QRData

DataInterfaceTestAbstract.php : 27
`protected QRData $QRData`

#### $testdata

ECITest.php : 23
`protected string $testdata = '无可奈何燃花作香'`

#### $testCharset

ECITest.php : 24
`private int $testCharset = \chillerlan\QRCode\Common\ECICharset::GB18030`

### Methods

#### eciCharsetIdProvider()

ECITest.php : 126
`public static eciCharsetIdProvider() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### maskPatternProvider()

DataInterfaceTestAbstract.php : 55
`public static maskPatternProvider() : array<string|int, array<string|int, int>>`

##### Tags

see
  testInitMatrix()

##### Return values

array<string|int, array<string|int, int>> —

#### stringValidateProvider()

ECITest.php : 33
`public static stringValidateProvider() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### testBinaryStringInvalid()

ECITest.php : 66

Tests if a binary string is properly validated as false

`public testBinaryStringInvalid() : void`

##### Tags

inheritDoc

##### Return values

void —

#### testCodeLengthOverflowException()

ECITest.php : 100

Tests if an exception is thrown on data overflow

`public testCodeLengthOverflowException() : void`

##### Tags

inheritDoc

##### Return values

void —

#### testConvertUnknownEncoding()

ECITest.php : 182

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()

ECITest.php : 38

Verifies the QRDataModeInterface instance

`public testDataModeInstance() : void`

##### Tags

inheritDoc

##### Return values

void —

#### testDecodeECISegmentFollowedByInvalidModeException()

ECITest.php : 153

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()

ECITest.php : 75

Tests decoding a data segment from a given BitBuffer

`public testDecodeSegment(int $version) : void`

##### Parameters

$version : int

##### Tags

inheritDoc
dataProvider

  versionBreakpointProvider

##### Return values

void —

#### testGetMinimumVersion()

ECITest.php : 60

Tests getting the minimum QR version for the given data

`public testGetMinimumVersion() : void`

##### Tags

inheritDoc

##### Return values

void —

#### testGetMinimumVersionException()

ECITest.php : 94

Tests if an exception is thrown when the data exceeds the maximum version while auto-detecting

`public testGetMinimumVersionException() : void`

##### Tags

inheritDoc

##### Return values

void —

#### testInitMatrix()

ECITest.php : 48

Tests initializing the data matrix

`public testInitMatrix(int $maskPattern) : void`

##### Parameters

$maskPattern : int

##### Tags

inheritDoc
dataProvider

  maskPatternProvider

##### Return values

void —

#### testInstance()

DataInterfaceTestAbstract.php : 38

Verifies the QRData instance

`public testInstance() : void`

##### Return values

void —

#### testInvalidDataException()

ECITest.php : 106

Tests if an exception is thrown when an invalid character is encountered

`public testInvalidDataException() : void`

##### Tags

inheritDoc

##### Return values

void —

#### testInvalidDataOnEmptyException()

ECITest.php : 119

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()

ECITest.php : 140
`public testReadWrite(int $id, int $lengthInBits) : void`

##### Parameters

$id : int
$lengthInBits : int

##### Tags

dataProvider

  eciCharsetIdProvider

##### Return values

void —

#### testValidateString()

DataInterfaceTestAbstract.php : 96

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

dataProvider

  stringValidateProvider

##### Return values

void —

#### unknownEncodingDataProvider()

ECITest.php : 170
`public unknownEncodingDataProvider() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### versionBreakpointProvider()

DataInterfaceTestAbstract.php : 114

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()

DataInterfaceTestAbstract.php : 31
`protected setUp() : void`

##### Return values

void —

#### getDataSegments()

ECITest.php : 26
`private getDataSegments() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

## Search results