# Documentation

Menu

## ECITest extends TestCase
in package

FinalYes
ECITest.php : 23

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

ECITest.php : 28
`private mixed testData = '无可奈何燃花作香'`

### Properties

#### $QRData

ECITest.php : 25
`private QRData $QRData`

#### $testCharset

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

### Methods

#### eciCharsetIdProvider()

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

##### Tags

phpstan-return

  array<int, array{0: int, 1: int}>

##### Return values

array<string|int, mixed>

#### testConvertUnknownEncoding()

ECITest.php : 153

Tests detection of an unknown character set

`public testConvertUnknownEncoding(int $id, string $data) : void`

##### Parameters

$id : int
$data : string

##### Attributes

#[DataProvider]
  'unknownEncodingDataProvider'

#### testDataModeInstance()

ECITest.php : 44
`public testDataModeInstance() : void`

#### testDecodeECISegmentFollowedByInvalidModeException()

ECITest.php : 122

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

ECITest.php : 59
`public testDecodeSegment(int $version) : void`

##### Parameters

$version : int

##### Attributes

#[DataProvider]
  'versionBreakpointProvider'

#### testInvalidDataException()

ECITest.php : 77
`public testInvalidDataException() : void`

#### testInvalidDataOnEmptyException()

ECITest.php : 88

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

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

##### Parameters

$id : int
$lengthInBits : int

##### Attributes

#[DataProvider]
  'eciCharsetIdProvider'

#### unknownEncodingDataProvider()

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

##### Tags

phpstan-return

  array<string, array{0: int, 1: string}>

##### Return values

array<string|int, mixed>

#### versionBreakpointProvider()

ECITest.php : 55

returns versions within the version breakpoints 1-9, 10-26 and 27-40

`public static versionBreakpointProvider() : array<string|int, mixed>`

##### Tags

phpstan-return

  array<string, array{0: int}>

##### Return values

array<string|int, mixed>

#### setUp()

ECITest.php : 30
`protected setUp() : void`

#### getDataSegments()

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

##### Tags

phpstan-return

  array{0: ECI, 1: Byte}

##### Return values

array<string|int, mixed>

## Search results