# Documentation

Menu

## QRCodeTest extends TestCase
in package
uses BuildDirTrait

FinalYes
QRCodeTest.php : 22

Tests basic functions of the QRCode class

### Table of Contents

#### Constants

buildDir = 'output-test'

#### Properties

$_buildDir : string
$options : QROptions
$qrcode : QRCode

#### Methods

testInitCustomOutputInterfaceNotExistsException() : void
  tests if an exception is thrown if the given output class does not exist
testInitCustomOutputInterfaceNotImplementsException() : void
  tests if an exception is thrown if the given output class does not implement QROutputInterface
testRenderToCacheFile() : void
  Tests if a cache file is properly saved in the given path
testSaveException() : void
  Tests if an exception is thrown when trying to write a cache file to an invalid destination
createBuildDir() : void
  attempts to create the build dir
getBuildDir() : string
  returns the full (real) path to the given build path
getBuildFileContent() : string
  returns the contents of the given build file
getBuildFilePath() : string
  returns the full (real) path to the given build file
getBuildPath() : string
  returns the full raw path to the build dir
setUp() : void
  invoke test instances

### Constants

#### buildDir

QRCodeTest.php : 28
`private mixed buildDir = 'output-test'`

### Properties

#### $_buildDir

BuildDirTrait.php : 22
`private string $_buildDir = __DIR__ . '/../.build/'`

#### $options

QRCodeTest.php : 26
`private QROptions $options`

#### $qrcode

QRCodeTest.php : 25
`private QRCode $qrcode`

### Methods

#### testInitCustomOutputInterfaceNotExistsException()

QRCodeTest.php : 43

tests if an exception is thrown if the given output class does not exist

`public testInitCustomOutputInterfaceNotExistsException() : void`

#### testInitCustomOutputInterfaceNotImplementsException()

QRCodeTest.php : 55

tests if an exception is thrown if the given output class does not implement QROutputInterface

`public testInitCustomOutputInterfaceNotImplementsException() : void`

#### testRenderToCacheFile()

QRCodeTest.php : 79

Tests if a cache file is properly saved in the given path

`public testRenderToCacheFile() : void`

#### testSaveException()

QRCodeTest.php : 67

Tests if an exception is thrown when trying to write a cache file to an invalid destination

`public testSaveException() : void`

#### createBuildDir()

BuildDirTrait.php : 36

attempts to create the build dir

`protected createBuildDir(string $subPath) : void`

##### Parameters

$subPath : string

##### Tags

throws
  RuntimeException

#### getBuildDir()

BuildDirTrait.php : 54

returns the full (real) path to the given build path

`protected getBuildDir([string $subPath = '' ]) : string`

##### Parameters

$subPath : string = ''

##### Tags

throws
  RuntimeException

##### Return values

string

#### getBuildFileContent()

BuildDirTrait.php : 88

returns the contents of the given build file

`protected getBuildFileContent(string $fileSubPath) : string`

##### Parameters

$fileSubPath : string

##### Tags

throws
  RuntimeException

##### Return values

string

#### getBuildFilePath()

BuildDirTrait.php : 69

returns the full (real) path to the given build file

`protected getBuildFilePath(string $fileSubPath) : string`

##### Parameters

$fileSubPath : string

##### Tags

throws
  RuntimeException

##### Return values

string

#### getBuildPath()

BuildDirTrait.php : 27

returns the full raw path to the build dir

`protected getBuildPath(string $subPath) : string`

##### Parameters

$subPath : string

##### Return values

string

#### setUp()

QRCodeTest.php : 33

invoke test instances

`protected setUp() : void`

## Search results