QROutputTestAbstract
extends TestCase
in package
Test abstract for the several (built-in) output modules, should also be used to test custom output modules
Table of Contents
- $builddir : string
- $matrix : QRMatrix
- $options : QROptions
- $outputInterface : QROutputInterface
- testInstance() : void
- Validate the instance of the interface
- testRenderImage() : void
- covers the built-in output modules, tests against pre-rendered data
- testSaveException() : void
- Tests if an exception is thrown when trying to write a cache file to an invalid destination
- testSetModuleValues() : void
- covers the module values settings
- testStringOutput() : void
- coverage of the built-in output modules
- types() : array<string|int, array<string|int, string>>
- getOutputInterface() : QROutputInterface
- Returns a QROutputInterface instance with the given options and using $this->matrix
- setUp() : void
- Attempts to create a directory under /.build and instances several required objects
Properties
$builddir
protected
string
$builddir
= __DIR__ . '/../../.build/output_test'
$matrix
protected
QRMatrix
$matrix
$options
protected
QROptions
$options
$outputInterface
protected
QROutputInterface
$outputInterface
Methods
testInstance()
Validate the instance of the interface
public
testInstance() : void
Return values
void —testRenderImage()
covers the built-in output modules, tests against pre-rendered data
public
testRenderImage(string $type) : void
Parameters
- $type : string
Tags
Return values
void —testSaveException()
Tests if an exception is thrown when trying to write a cache file to an invalid destination
public
testSaveException() : void
Return values
void —testSetModuleValues()
covers the module values settings
public
abstract testSetModuleValues() : void
Return values
void —testStringOutput()
coverage of the built-in output modules
public
testStringOutput(string $type) : void
Parameters
- $type : string
Tags
Return values
void —types()
public
abstract types() : array<string|int, array<string|int, string>>
Tags
Return values
array<string|int, array<string|int, string>> —getOutputInterface()
Returns a QROutputInterface instance with the given options and using $this->matrix
protected
abstract getOutputInterface(QROptions $options) : QROutputInterface
Parameters
- $options : QROptions
Return values
QROutputInterface —setUp()
Attempts to create a directory under /.build and instances several required objects
protected
setUp() : void