QRCodeReaderGDTest
extends QRCodeReaderTestAbstract
in package
FinalYes
Tests the GD based reader
Table of Contents
Constants
- loremipsum = 'Just let this happen. We just let this flow right out of our minds. ' . 'Anyone can paint. We touch the canvas, the canvas takes what it wants. From all of us here, ' . 'I want to wish you happy painting and God bless, my friends. A tree cannot be straight if it has a crooked trunk. ' . 'You have to make almighty decisions when you\'re the creator. I guess that would be considered a UFO. ' . 'A big cotton ball in the sky. I\'m gonna add just a tiny little amount of Prussian Blue. ' . 'They say everything looks better with odd numbers of things. But sometimes I put even numbers—just ' . 'to upset the critics. We\'ll lay all these little funky little things in there. '
- samplesDir = __DIR__ . '/samples/'
Properties
Methods
- dataTestProvider() : Generator
- getMaxLengthForMode() : int
- the maximum character count for the given $mode and $eccLevel
- qrCodeProvider() : array<string|int, mixed>
- testReadData() : void
- testReader() : void
- testReaderMultiMode() : void
- debugMatrix() : void
- Matrix debugging console output
- dm() : void
- debugging shortcut - limit to a single version when using with matrixProvider
- getLuminanceSourceFromFile() : LuminanceSourceInterface
- setUp() : void
Constants
loremipsum
protected
mixed
loremipsum
= 'Just let this happen. We just let this flow right out of our minds. ' . 'Anyone can paint. We touch the canvas, the canvas takes what it wants. From all of us here, ' . 'I want to wish you happy painting and God bless, my friends. A tree cannot be straight if it has a crooked trunk. ' . 'You have to make almighty decisions when you\'re the creator. I guess that would be considered a UFO. ' . 'A big cotton ball in the sky. I\'m gonna add just a tiny little amount of Prussian Blue. ' . 'They say everything looks better with odd numbers of things. But sometimes I put even numbers—just ' . 'to upset the critics. We\'ll lay all these little funky little things in there. '
Tags
samplesDir
protected
mixed
samplesDir
= __DIR__ . '/samples/'
Properties
$options
protected
SettingsContainerInterface|QROptions
$options
Methods
dataTestProvider()
public
static dataTestProvider() : Generator
Return values
GeneratorgetMaxLengthForMode()
the maximum character count for the given $mode and $eccLevel
public
static getMaxLengthForMode(int $mode, Version $version, EccLevel $eccLevel) : int
Parameters
Tags
Return values
intqrCodeProvider()
public
static qrCodeProvider() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>testReadData()
public
testReadData(Version $version, EccLevel $ecc, string $expected) : void
Parameters
Attributes
- #[DataProvider]
- 'dataTestProvider'
- #[Group]
- 'slow'
testReader()
public
testReader(string $img, string $expected, bool $grayscale) : void
Parameters
- $img : string
- $expected : string
- $grayscale : bool
Attributes
- #[DataProvider]
- 'qrCodeProvider'
- #[Group]
- 'slow'
testReaderMultiMode()
public
testReaderMultiMode() : void
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
getLuminanceSourceFromFile()
protected
getLuminanceSourceFromFile(string $file, SettingsContainerInterface|QROptions $options) : LuminanceSourceInterface
Parameters
- $file : string
- $options : SettingsContainerInterface|QROptions
Return values
LuminanceSourceInterfacesetUp()
protected
setUp() : void