VuFind API Documentation

FavoriteFacetsTest extends TestCase
in package
Uses ConfigPluginManagerTrait

FavoriteFacets recommendation module Test Class

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Wiki

Table of Contents

testFacetInitWithDisabledTags()  : void
Test facet initialization with disabled tags.
testFacetInitWithEnabledTags()  : void
Test facet initialization with enabled tags.
getFavoriteFacets()  : FavoriteFacets
Get a fully configured module
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.
getMockParams()  : Params
Get a mock params object.
getMockResults()  : Results
Get a mock results object.

Methods

testFacetInitWithDisabledTags()

Test facet initialization with disabled tags.

public testFacetInitWithDisabledTags() : void
Return values
void

testFacetInitWithEnabledTags()

Test facet initialization with enabled tags.

public testFacetInitWithEnabledTags() : void
Return values
void

getFavoriteFacets()

Get a fully configured module

protected getFavoriteFacets([Results $results = null ][, string $tagSetting = 'enabled' ][, string $settings = '' ][, Parameters $request = null ][, PluginManager $configLoader = null ]) : FavoriteFacets
Parameters
$results : Results = null

results object

$tagSetting : string = 'enabled'

Are tags enabled?

$settings : string = ''

settings

$request : Parameters = null

request

$configLoader : PluginManager = null

config loader

Return values
FavoriteFacets

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

Search results