QRMatrixTest
extends TestCase
in package
uses
QRMatrixDebugTrait
Tests the QRMatrix class
Table of Contents
Constants
- version = 40
Properties
Methods
- checkNeighbours() : void
- Tests checking the adjacent modules
- checkTypeIn() : void
- Tests checking whether the M_TYPE of a module is not one of an array of M_TYPES
- flip() : void
- Tests flipping the value of a module
- getECC() : void
- Tests if eccLevel() returns the current (given) ECC level
- getMaskPattern() : void
- Tests if maskPattern() returns the current (or default) mask pattern
- getSetCheck() : void
- Tests the set(), get() and check() methods
- getSize() : void
- Tests if size() returns the actual matrix size/count
- getVersion() : void
- Tests if version() returns the current (given) version
- matrixProvider() : Generator
- Version data provider for several pattern tests
- rotate90() : void
- Tests rotating the matrix by 90 degrees CW
- setAlignmentPattern() : void
- Tests the alignment patterns and verifies their positions - version 1 (no pattern) skipped
- setDarkModule() : void
- Tests setting the dark module and verifies its position
- setFinderPattern() : void
- Tests setting the finder patterns and verifies their positions
- setFormatInfo() : void
- Tests the format patterns and verifies their positions
- setLogoSpaceExceedsException() : void
- Tests whether an exception is thrown when width or height exceed the matrix size
- setLogoSpaceInvalidEccException() : void
- Tests whether an exception is thrown when an ECC level other than "H" is set when attempting to add logo space
- setLogoSpaceMaxSizeException() : void
- Tests whether an exception is thrown when the logo space size exceeds the maximum ECC capacity
- setLogoSpaceOmitDimension() : void
- Tests if the logo space is drawn square if one of the dimensions is omitted
- setLogoSpaceOrientation() : void
- Tests the auto orientation of the logo space
- setLogoSpacePosition() : void
- Tests the manual positioning of the logo space
- setQuietZone() : void
- Tests the quiet zone pattern and verifies its position
- setQuietZoneException() : void
- Tests if an exception is thrown in an attempt to create the quiet zone before data was written
- setSeparators() : void
- Tests the separator patterns and verifies their positions
- setTimingPattern() : void
- Tests the timing patterns and verifies their positions
- setVersionNumber() : void
- Tests the version patterns and verifies their positions - version < 7 skipped
- debugMatrix() : void
- Matrix debugging console output
- dm() : void
- debugging shortcut - limit to a single version when using with matrixProvider
- setUp() : void
- invokes a QRMatrix object
Constants
version
private
mixed
version
= 40
Properties
$matrix
private
QRMatrix
$matrix
Methods
checkNeighbours()
Tests checking the adjacent modules
public
checkNeighbours() : void
Attributes
- #[Test]
checkTypeIn()
Tests checking whether the M_TYPE of a module is not one of an array of M_TYPES
public
checkTypeIn() : void
Attributes
- #[Test]
flip()
Tests flipping the value of a module
public
flip() : void
Attributes
- #[Test]
getECC()
Tests if eccLevel() returns the current (given) ECC level
public
getECC() : void
Attributes
- #[Test]
getMaskPattern()
Tests if maskPattern() returns the current (or default) mask pattern
public
getMaskPattern() : void
Attributes
- #[Test]
getSetCheck()
Tests the set(), get() and check() methods
public
getSetCheck() : void
Attributes
- #[Test]
getSize()
Tests if size() returns the actual matrix size/count
public
getSize() : void
Attributes
- #[Test]
getVersion()
Tests if version() returns the current (given) version
public
getVersion() : void
Attributes
- #[Test]
matrixProvider()
Version data provider for several pattern tests
public
static matrixProvider() : Generator
Return values
Generatorrotate90()
Tests rotating the matrix by 90 degrees CW
public
rotate90(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
setAlignmentPattern()
Tests the alignment patterns and verifies their positions - version 1 (no pattern) skipped
public
setAlignmentPattern(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
setDarkModule()
Tests setting the dark module and verifies its position
public
setDarkModule(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
setFinderPattern()
Tests setting the finder patterns and verifies their positions
public
setFinderPattern(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
setFormatInfo()
Tests the format patterns and verifies their positions
public
setFormatInfo(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
setLogoSpaceExceedsException()
Tests whether an exception is thrown when width or height exceed the matrix size
public
setLogoSpaceExceedsException() : void
Attributes
- #[Test]
setLogoSpaceInvalidEccException()
Tests whether an exception is thrown when an ECC level other than "H" is set when attempting to add logo space
public
setLogoSpaceInvalidEccException() : void
Attributes
- #[Test]
setLogoSpaceMaxSizeException()
Tests whether an exception is thrown when the logo space size exceeds the maximum ECC capacity
public
setLogoSpaceMaxSizeException() : void
Attributes
- #[Test]
setLogoSpaceOmitDimension()
Tests if the logo space is drawn square if one of the dimensions is omitted
public
setLogoSpaceOmitDimension() : void
Attributes
- #[Test]
setLogoSpaceOrientation()
Tests the auto orientation of the logo space
public
setLogoSpaceOrientation() : void
Attributes
- #[Test]
setLogoSpacePosition()
Tests the manual positioning of the logo space
public
setLogoSpacePosition() : void
Attributes
- #[Test]
setQuietZone()
Tests the quiet zone pattern and verifies its position
public
setQuietZone(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
setQuietZoneException()
Tests if an exception is thrown in an attempt to create the quiet zone before data was written
public
setQuietZoneException() : void
Attributes
- #[Test]
setSeparators()
Tests the separator patterns and verifies their positions
public
setSeparators(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
setTimingPattern()
Tests the timing patterns and verifies their positions
public
setTimingPattern(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
setVersionNumber()
Tests the version patterns and verifies their positions - version < 7 skipped
public
setVersionNumber(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Attributes
- #[DataProvider]
- 'matrixProvider'
- #[Test]
debugMatrix()
Matrix debugging console output
protected
debugMatrix(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
dm()
debugging shortcut - limit to a single version when using with matrixProvider
protected
dm(QRMatrix $matrix) : void
Parameters
- $matrix : QRMatrix
Tags
setUp()
invokes a QRMatrix object
protected
setUp() : void