ByteTest
extends DataInterfaceTestAbstract
in package
Tests the Byte class
Table of Contents
- $FQN : string
- $QRData : QRData
- $testdata : string
- maskPatternProvider() : array<string|int, array<string|int, int>>
- stringValidateProvider() : array<string|int, mixed>
- isByte() passses any binary string and only fails on empty strings
- testBinaryStringInvalid() : void
- Tests if a binary string is properly validated as false
- testCodeLengthOverflowException() : void
- Tests if an exception is thrown on data overflow
- testDataModeInstance() : void
- Verifies the QRDataModeInterface instance
- 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
- Tests if an exception is thrown if the given string is empty
- testValidateString() : void
- Tests if a string is properly validated for the respective data mode
- versionBreakpointProvider() : array<string|int, mixed>
- returns versions within the version breakpoints 1-9, 10-26 and 27-40
- setUp() : void
Properties
$FQN
protected
string
$FQN
= \chillerlan\QRCode\Data\Byte::class
$QRData
protected
QRData
$QRData
$testdata
protected
string
$testdata
= '[¯\\_(ツ)_/¯]'
Methods
maskPatternProvider()
public
static maskPatternProvider() : array<string|int, array<string|int, int>>
Tags
Return values
array<string|int, array<string|int, int>> —stringValidateProvider()
isByte() passses any binary string and only fails on empty strings
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
Return values
void —testDataModeInstance()
Verifies the QRDataModeInterface instance
public
testDataModeInstance() : 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
Return values
void —testGetMinimumVersionException()
Tests if an exception is thrown when the data exceeds the maximum version while auto-detecting
public
testGetMinimumVersionException() : void
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()
Tests if an exception is thrown if the given string is empty
public
testInvalidDataOnEmptyException() : void
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 —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