VuFind API Documentation

RandomRecommendTest extends TestCase
in package
Uses FixtureTrait, ReflectionTrait, SolrSearchObjectTrait

Random Recommend tests.

Tags
category

VuFind

author

Luke O'Sullivan l.osullivan@swansea.ac.uk

license

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

link

Wiki

Table of Contents

$recommend  : RandomRecommend
Random recommendation module class
getMockConfigManager()  : PluginManager
Get mock config manager.
getSolrOptions()  : Options
Get Solr options.
getSolrParams()  : Params
Get Solr params.
getSolrResults()  : Results
Get Solr results.
setUp()  : void
Standard setup method.
testCanInitialise()  : void
Test initialisation
testCanInitialiseInDisregardMode()  : void
Test initialisation
testCanSetDisplayMode()  : void
Test displaymode
testCanSetSettings()  : void
Test settings
testDefaultSettings()  : void
Test default settings
testWillReturnEmptyForMinimumResultLimit()  : void
Test minimum result limit feature
testWillReturnResults()  : void
Test results coming back
callMethod()  : mixed
Call protected or private method for side-effect and result.
getConfiguredModule()  : RandomRecommend
Get a module configured to return results.
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).
getProperty()  : mixed
Return protected or private property.
setProperty()  : void
Set protected or private property.
unserializeFixture()  : mixed
Get a fixture object

Properties

Methods

testCanInitialise()

Test initialisation

public testCanInitialise() : void
Return values
void

testCanInitialiseInDisregardMode()

Test initialisation

public testCanInitialiseInDisregardMode() : void
Return values
void

testCanSetDisplayMode()

Test displaymode

public testCanSetDisplayMode() : void
Return values
void

testCanSetSettings()

Test settings

public testCanSetSettings() : void
Return values
void

testDefaultSettings()

Test default settings

public testDefaultSettings() : void
Return values
void

testWillReturnEmptyForMinimumResultLimit()

Test minimum result limit feature

public testWillReturnEmptyForMinimumResultLimit() : void
Return values
void

testWillReturnResults()

Test results coming back

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

getConfiguredModule()

Get a module configured to return results.

protected getConfiguredModule(string $recConfig) : RandomRecommend
Parameters
$recConfig : string

Recommendation module configuration

Return values
RandomRecommend

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>

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

unserializeFixture()

Get a fixture object

protected unserializeFixture(string $file) : mixed
Parameters
$file : string

Fixture name

Return values
mixed

Search results