VuFind API Documentation

ParamsTest extends TestCase
in package
Uses ConfigPluginManagerTrait, ReflectionTrait

Solr Search Object Parameters Test

Tags
category

VuFind

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

sortValueProvider()  : array<string|int, mixed>
Data provider for testSortTieBreakerParameter.
testCheckboxVisibility()  : void
Test that checkbox filters are always visible (or not) as appropriate.
testFilters()  : void
Test that filters work as expected.
testGetSearchClassId()  : void
Test that we get a mock search class ID while testing.
testSortTieBreakerParameter()  : void
Test sort tie-breaker parameter.
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.
getParams()  : Params
Get Params object
getProperty()  : mixed
Return protected or private property.
setProperty()  : void
Set protected or private property.

Methods

sortValueProvider()

Data provider for testSortTieBreakerParameter.

public static sortValueProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

testCheckboxVisibility()

Test that checkbox filters are always visible (or not) as appropriate.

public testCheckboxVisibility() : void
Return values
void

testFilters()

Test that filters work as expected.

public testFilters() : void
Return values
void

testGetSearchClassId()

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

public testGetSearchClassId() : void
Return values
void

testSortTieBreakerParameter()

Test sort tie-breaker parameter.

public testSortTieBreakerParameter(string $sort, string $tieBreaker, string $expectedResult) : void
Parameters
$sort : string

Sort parameter of normalizeSort method

$tieBreaker : string

Sort tie breaker form Searches.ini

$expectedResult : string

Expected return value from normalizeSort

Tags
dataProvider

sortValueProvider

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

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