Menu

## QRMatrixTest extends TestCase
in package

QRMatrixTest.php : 24

Tests the QRMatix class

### Table of Contents

version = 40
$matrix : QRMatrix
debugMatrix() : void
  Matrix debugging console output
matrixProvider() : Generator
  Version data provider for several pattern tests
testCheckNeighbours() : void
  Tests checking the adjacent modules
testCheckTypeNotIn() : void
  Tests checking whether the M_TYPE of a module is not one of an array of M_TYPES
testECC() : void
  Tests if eccLevel() returns the current (given) ECC level
testFlip() : void
  Tests flipping the value of a module
testGetSetCheck() : void
  Tests the set(), get() and check() methods
testInstance() : void
  Validates the QRMatrix instance
testMaskPattern() : void
  Tests if maskPattern() returns the current (or default) mask pattern
testSetAlignmentPattern() : void
  Tests the alignment patterns and verifies their positions - version 1 (no pattern) skipped
testSetDarkModule() : void
  Tests setting the dark module and verifies its position
testSetFinderPattern() : void
  Tests setting the finder patterns and verifies their positions
testSetFormatInfo() : void
  Tests the format patterns and verifies their positions
testSetLogoSpaceExceedsException() : void
  Tests whether an exception is thrown when width or height exceed the matrix size
testSetLogoSpaceInvalidEccException() : void
  Tests whether an exception is thrown when an ECC level other than "H" is set when attempting to add logo space
testSetLogoSpaceMaxSizeException() : void
  Tests whether an exception is thrown when the logo space size exceeds the maximum ECC capacity
testSetLogoSpaceOmitHeight() : void
  Tests if the logo space is drawn square if one of the dimensions is omitted
testSetLogoSpaceOrientation() : void
  Tests the auto orientation of the logo space
testSetLogoSpacePosition() : void
  Tests the manual positioning of the logo space
testSetQuietZone() : void
  Tests the quiet zone pattern and verifies its position
testSetQuietZoneException() : void
  Tests if an exception is thrown in an attempt to create the quiet zone before data was written
testSetSeparators() : void
  Tests the separator patterns and verifies their positions
testSetTimingPattern() : void
  Tests the timing patterns and verifies their positions
testSetVersionNumber() : void
  Tests the version patterns and verifies their positions - version < 7 skipped
testSize() : void
  Tests if size() returns the actual matrix size/count
testVersion() : void
  Tests if version() returns the current (given) version
dm() : void
  debugging shortcut qirth limit to a single version when using with matrixProvider
setUp() : void
  invokes a QRMatrix object

### Constants

#### version

QRMatrixTest.php : 26
`private mixed version = 40`

### Properties

#### $matrix

QRMatrixTest.php : 27
`private QRMatrix $matrix`

### Methods

#### debugMatrix()

QRMatrixTest.php : 43

Matrix debugging console output

`public static debugMatrix(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Return values

void —

#### matrixProvider()

QRMatrixTest.php : 170

Version data provider for several pattern tests

`public matrixProvider() : Generator`

##### Return values

Generator —

#### testCheckNeighbours()

QRMatrixTest.php : 512

Tests checking the adjacent modules

`public testCheckNeighbours() : void`

##### Return values

void —

#### testCheckTypeNotIn()

QRMatrixTest.php : 502

Tests checking whether the M_TYPE of a module is not one of an array of M_TYPES

`public testCheckTypeNotIn() : void`

##### Return values

void —

#### testECC()

QRMatrixTest.php : 135

Tests if eccLevel() returns the current (given) ECC level

`public testECC() : void`

##### Return values

void —

#### testFlip()

QRMatrixTest.php : 479

Tests flipping the value of a module

`public testFlip() : void`

##### Return values

void —

#### testGetSetCheck()

QRMatrixTest.php : 153

Tests the set(), get() and check() methods

`public testGetSetCheck() : void`

##### Return values

void —

#### testInstance()

QRMatrixTest.php : 114

Validates the QRMatrix instance

`public testInstance() : void`

##### Return values

void —

#### testMaskPattern()

QRMatrixTest.php : 142

Tests if maskPattern() returns the current (or default) mask pattern

`public testMaskPattern() : void`

##### Return values

void —

#### testSetAlignmentPattern()

QRMatrixTest.php : 228

Tests the alignment patterns and verifies their positions - version 1 (no pattern) skipped

`public testSetAlignmentPattern(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

dataProvider

  matrixProvider

##### Return values

void —

#### testSetDarkModule()

QRMatrixTest.php : 184

Tests setting the dark module and verifies its position

`public testSetDarkModule(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

dataProvider

  matrixProvider

##### Return values

void —

#### testSetFinderPattern()

QRMatrixTest.php : 197

Tests setting the finder patterns and verifies their positions

`public testSetFinderPattern(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

dataProvider

  matrixProvider

##### Return values

void —

#### testSetFormatInfo()

QRMatrixTest.php : 310

Tests the format patterns and verifies their positions

`public testSetFormatInfo(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

dataProvider

  matrixProvider

##### Return values

void —

#### testSetLogoSpaceExceedsException()

QRMatrixTest.php : 451

Tests whether an exception is thrown when width or height exceed the matrix size

`public testSetLogoSpaceExceedsException() : void`

##### Return values

void —

#### testSetLogoSpaceInvalidEccException()

QRMatrixTest.php : 441

Tests whether an exception is thrown when an ECC level other than "H" is set when attempting to add logo space

`public testSetLogoSpaceInvalidEccException() : void`

##### Return values

void —

#### testSetLogoSpaceMaxSizeException()

QRMatrixTest.php : 465

Tests whether an exception is thrown when the logo space size exceeds the maximum ECC capacity

`public testSetLogoSpaceMaxSizeException() : void`

##### Return values

void —

#### testSetLogoSpaceOmitHeight()

QRMatrixTest.php : 362

Tests if the logo space is drawn square if one of the dimensions is omitted

`public testSetLogoSpaceOmitHeight() : void`

##### Return values

void —

#### testSetLogoSpaceOrientation()

QRMatrixTest.php : 384

Tests the auto orientation of the logo space

`public testSetLogoSpaceOrientation() : void`

##### Return values

void —

#### testSetLogoSpacePosition()

QRMatrixTest.php : 408

Tests the manual positioning of the logo space

`public testSetLogoSpacePosition() : void`

##### Return values

void —

#### testSetQuietZone()

QRMatrixTest.php : 326

Tests the quiet zone pattern and verifies its position

`public testSetQuietZone(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

dataProvider

  matrixProvider

##### Return values

void —

#### testSetQuietZoneException()

QRMatrixTest.php : 352

Tests if an exception is thrown in an attempt to create the quiet zone before data was written

`public testSetQuietZoneException() : void`

##### Return values

void —

#### testSetSeparators()

QRMatrixTest.php : 212

Tests the separator patterns and verifies their positions

`public testSetSeparators(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

dataProvider

  matrixProvider

##### Return values

void —

#### testSetTimingPattern()

QRMatrixTest.php : 260

Tests the timing patterns and verifies their positions

`public testSetTimingPattern(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

dataProvider

  matrixProvider

##### Return values

void —

#### testSetVersionNumber()

QRMatrixTest.php : 289

Tests the version patterns and verifies their positions - version < 7 skipped

`public testSetVersionNumber(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

dataProvider

  matrixProvider

##### Return values

void —

#### testSize()

QRMatrixTest.php : 121

Tests if size() returns the actual matrix size/count

`public testSize() : void`

##### Return values

void —

#### testVersion()

QRMatrixTest.php : 128

Tests if version() returns the current (given) version

`public testVersion() : void`

##### Return values

void —

#### dm()

QRMatrixTest.php : 101

debugging shortcut qirth limit to a single version when using with matrixProvider

`protected dm(QRMatrix $matrix) : void`

##### Parameters

$matrix : QRMatrix

##### Tags

see
  QRMatrixTest::matrixProvider()

##### Return values

void —

#### setUp()

QRMatrixTest.php : 32

invokes a QRMatrix object

`protected setUp() : void`

##### Return values

void —

## Search results