VuFind API Documentation

SearchSpecsReaderTest extends TestCase
in package
Uses FixtureTrait, PathResolverTrait, ReflectionTrait

Config SearchSpecsReader Test Class

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Chris Hallberg challber@villanova.edu

license

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

link

Wiki

Table of Contents

testMissingFileRead()  : void
Test loading of a non-existent YAML file.
testParentYaml()  : void
Test @parent_yaml directive.
testSearchSpecsRead()  : void
Test loading of a YAML file.
testYamlLoad()  : void
Test direct loading of two single files.
testYamlMerge()  : void
Test merging of two files.
addPathResolverToContainer()  : void
Add PathResolverFactory to a mock container
callMethod()  : mixed
Call protected or private method for side-effect and result.
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).
getPathResolver()  : PathResolver
Get a config file path resolver
getProperty()  : mixed
Return protected or private property.
setProperty()  : void
Set protected or private property.

Methods

testMissingFileRead()

Test loading of a non-existent YAML file.

public testMissingFileRead() : void
Return values
void

testParentYaml()

Test @parent_yaml directive.

public testParentYaml() : void
Return values
void

testSearchSpecsRead()

Test loading of a YAML file.

public testSearchSpecsRead() : void
Return values
void

testYamlLoad()

Test direct loading of two single files.

public testYamlLoad() : void
Return values
void

testYamlMerge()

Test merging of two files.

public testYamlMerge() : void
Return values
void

addPathResolverToContainer()

Add PathResolverFactory to a mock container

protected addPathResolverToContainer(MockContainer $container) : void
Parameters
$container : MockContainer

Mock Container

Return values
void

callMethod()

Call protected or private method for side-effect and result.

protected callMethod(object|string $object, string $method[, array<string|int, mixed> $arguments = [] ]) : mixed

Uses PHP's reflection API in order to modify method accessibility.

Parameters
$object : object|string

Object or class name

$method : string

Method name

$arguments : array<string|int, mixed> = []

Method arguments

Tags
throws
ReflectionException

Method does not exist

Return values
mixed

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>

getPathResolver()

Get a config file path resolver

protected getPathResolver([string|null $baseDirectory = null ]) : PathResolver
Parameters
$baseDirectory : string|null = null

Optional directory to override APPLICATION_PATH

Return values
PathResolver

getProperty()

Return protected or private property.

protected getProperty(object|string $object, string $property) : mixed

Uses PHP's reflection API in order to modify property accessibility.

Parameters
$object : object|string

Object or class name

$property : string

Property name

Tags
throws
ReflectionException

Property does not exist

Return values
mixed

setProperty()

Set protected or private property.

protected setProperty(object|string $object, string $property, mixed $value) : void

Uses PHP's reflection API in order to modify property accessibility.

Parameters
$object : object|string

Object or class name

$property : string

Property name

$value : mixed

Property value

Tags
throws
ReflectionException

Property does not exist

Return values
void

Search results