Documentation

QRCodeReaderTestAbstract extends TestCase
in package
uses QRMaxLengthTrait, QRMatrixDebugTrait

AbstractYes

Tests the QR Code 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

$options  : SettingsContainerInterface|QROptions

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
see
https://www.bobrosslipsum.com/

Properties

Methods

getMaxLengthForMode()

the maximum character count for the given $mode and $eccLevel

public static getMaxLengthForMode(int $mode, Version $version, EccLevel $eccLevel) : int
Parameters
$mode : int
$version : Version
$eccLevel : EccLevel
Tags
throws
QRCodeException
codeCoverageIgnore
Return values
int

qrCodeProvider()

public static qrCodeProvider() : array<string|int, mixed>
Tags
phpstan-return

array<string, array{0: string, 1: string, 2: bool}>

Return values
array<string|int, mixed>

testReader()

public testReader(string $img, string $expected, bool $grayscale) : void
Parameters
$img : string
$expected : string
$grayscale : bool
Attributes
#[DataProvider]
'qrCodeProvider'
#[Group]
'slow'

dm()

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

protected dm(QRMatrix $matrix) : void
Parameters
$matrix : QRMatrix
Tags
see
QRMatrixTest::matrixProvider()

        
On this page

Search results