VuFind API Documentation

CspHeaderGeneratorTest extends TestCase
in package
Uses FixtureTrait

CspHeaderGenerator test

Tags
category

VuFind

author

Maccabee Levine msl321@lehigh.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Page

Table of Contents

$nonceGenerator  : MockObject|NonceGenerator
Nonce generator mock
setUp()  : void
Set up the tests
testNetworkErrorLoggingHeaderComplex()  : void
Test a Network Error Logging header configuration with custom params
testNetworkErrorLoggingHeaderFalsyValues()  : void
Test a Network Error Logging header configuration with falsy values
testNetworkErrorLoggingHeaderSimple()  : void
Test a basic Network Error Logging header configuration
testReportToHeaderComplex()  : void
Test a ReportTo header configuration with two endpoints and three urls
testReportToHeaderSimple()  : void
Test a basic ReportTo header configuration
buildGenerator()  : CspHeaderGenerator
Build the CspHeaderGenerator object
getFixture()  : string
Load a fixture file.
getFixtureDir()  : string
Get the base directory containing fixtures.
getFixturePath()  : string
Resolve fixture path.
getJsonFixture()  : array<string|int, mixed>
Load a JSON fixture from file (using associative array return type).

Properties

Methods

testNetworkErrorLoggingHeaderComplex()

Test a Network Error Logging header configuration with custom params

public testNetworkErrorLoggingHeaderComplex() : void
Return values
void

testNetworkErrorLoggingHeaderFalsyValues()

Test a Network Error Logging header configuration with falsy values

public testNetworkErrorLoggingHeaderFalsyValues() : void
Return values
void

testNetworkErrorLoggingHeaderSimple()

Test a basic Network Error Logging header configuration

public testNetworkErrorLoggingHeaderSimple() : void
Return values
void

testReportToHeaderComplex()

Test a ReportTo header configuration with two endpoints and three urls

public testReportToHeaderComplex() : void
Return values
void

testReportToHeaderSimple()

Test a basic ReportTo header configuration

public testReportToHeaderSimple() : void
Return values
void

buildGenerator()

Build the CspHeaderGenerator object

protected buildGenerator(array<string|int, mixed> $configData) : CspHeaderGenerator
Parameters
$configData : array<string|int, mixed>

The contentsecuritypolicy.ini config data as an array

Return values
CspHeaderGenerator

getFixture()

Load a fixture file.

protected getFixture(string $filename[, string $module = 'VuFind' ]) : string
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Tags
throws
RuntimeException
Return values
string

getFixtureDir()

Get the base directory containing fixtures.

protected getFixtureDir([string $module = 'VuFind' ]) : string
Parameters
$module : string = 'VuFind'

Module containing fixture.

Return values
string

getFixturePath()

Resolve fixture path.

protected getFixturePath(string $filename[, string $module = 'VuFind' ]) : string
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Tags
throws
RuntimeException
Return values
string

getJsonFixture()

Load a JSON fixture from file (using associative array return type).

protected getJsonFixture(string $filename[, string $module = 'VuFind' ]) : array<string|int, mixed>
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Return values
array<string|int, mixed>

Search results