VuFind API Documentation

ParamsTest extends TestCase
in package
Uses ConfigPluginManagerTrait, ReflectionTrait

Base Search Object Parameters Test

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Preetha Rao vufind-tech@lists.sourceforge.net

author

Ere Maijala ere.maijala@helsinki.fi

license

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

link

Wiki

Table of Contents

testFilters()  : void
Test that filters work as expected.
testGetCheckboxFacets()  : void
Test that getCheckboxFacets works as expected.
testGetFacetLabel()  : void
Test that getFacetLabel works as expected.
testGetFacetLabelWithAliases()  : void
Test that getFacetLabel works as expected with aliases.
testGetSearchClassId()  : void
Test that we get a mock search class ID while testing.
testQueryAdapters()  : void
Test query adapters
testSpellingReplacements()  : void
Test that spelling replacement works as expected.
callMethod()  : mixed
Call protected or private method for side-effect and result.
getMockConfigPluginManager()  : MockObject|PluginManager
Get a mock configuration plugin manager with the given configuration "files" available.
getMockFailingConfigPluginManager()  : MockObject|PluginManager
Get a mock configuration plugin manager that will throw an exception.
getMockOptions()  : Options
Get mock Options object
getMockParams()  : Params
Get mock Params object
getProperty()  : mixed
Return protected or private property.
setProperty()  : void
Set protected or private property.

Methods

testFilters()

Test that filters work as expected.

public testFilters() : void
Return values
void

testGetCheckboxFacets()

Test that getCheckboxFacets works as expected.

public testGetCheckboxFacets() : void
Return values
void

testGetFacetLabel()

Test that getFacetLabel works as expected.

public testGetFacetLabel() : void
Return values
void

testGetFacetLabelWithAliases()

Test that getFacetLabel works as expected with aliases.

public testGetFacetLabelWithAliases() : void
Return values
void

testGetSearchClassId()

Test that we get a mock search class ID while testing.

public testGetSearchClassId() : void
Return values
void

testQueryAdapters()

Test query adapters

public testQueryAdapters() : void
Return values
void

testSpellingReplacements()

Test that spelling replacement works as expected.

public testSpellingReplacements() : void
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

getMockConfigPluginManager()

Get a mock configuration plugin manager with the given configuration "files" available.

protected getMockConfigPluginManager(array<string|int, mixed> $configs[, array<string|int, mixed> $default = [] ][, InvocationOrder|null $getExpect = null ][, InvocationOrder|null $hasExpect = null ]) : MockObject|PluginManager
Parameters
$configs : array<string|int, mixed>

An associative array of configurations where key is the file (e.g. 'config') and value an array of configuration sections and directives

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

Default configuration to return when no entry is found in $configs

$getExpect : InvocationOrder|null = null

The expected invocation order for the get() method (null for any)

$hasExpect : InvocationOrder|null = null

The expected invocation order for the has() method (null for any)

Return values
MockObject|PluginManager

getMockFailingConfigPluginManager()

Get a mock configuration plugin manager that will throw an exception.

protected getMockFailingConfigPluginManager(Throwable $exception) : MockObject|PluginManager
Parameters
$exception : Throwable

Exception to throw

Return values
MockObject|PluginManager

getMockParams()

Get mock Params object

protected getMockParams([Options $options = null ][, PluginManager $configManager = null ]) : Params
Parameters
$options : Options = null

Options object to send to Params constructor (null for new mock)

$configManager : PluginManager = null

Config manager for Params object (null for new mock)

Return values
Params

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