VuFind API Documentation

HideFacetValueListenerTest extends TestCase
in package
Uses MockSearchCommandTrait

Unit tests for Hide Facet Value Listener.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Main Site

Table of Contents

testAttach()  : void
Test attaching listener.
testHideFacet()  : void
Test actual functionality of listener, with "hide facet" setting.
testHideFacetsAndShowFacets()  : void
Test actual functionality of listener, with "hide facets" and "show facets" settings, demonstrating that both can be applied together (though doing so in a real-world scenario would not really make sense).
testShowFacets()  : void
Test actual functionality of listener, with "show facets" setting.
getFacets()  : array<string|int, mixed>
Get a facet array for testing.
getListener()  : HideFacetValueListener
Construct a listener for testing.
getMockBackend()  : Backend
Get a mock backend
getMockResult()  : RecordCollection
Construct a mock Solr result object.
getMockSearchCommand()  : AbstractBase
Get a mock search command.

Methods

testHideFacet()

Test actual functionality of listener, with "hide facet" setting.

public testHideFacet() : void
Return values
void

testHideFacetsAndShowFacets()

Test actual functionality of listener, with "hide facets" and "show facets" settings, demonstrating that both can be applied together (though doing so in a real-world scenario would not really make sense).

public testHideFacetsAndShowFacets() : void
Return values
void

testShowFacets()

Test actual functionality of listener, with "show facets" setting.

public testShowFacets() : void
Return values
void

getFacets()

Get a facet array for testing.

protected getFacets() : array<string|int, mixed>
Return values
array<string|int, mixed>

getListener()

Construct a listener for testing.

protected getListener([array<string|int, mixed> $hideFacetValues = [] ][, array<string|int, mixed> $showFacetValues = [] ]) : HideFacetValueListener
Parameters
$hideFacetValues : array<string|int, mixed> = []

Assoc. array of field name => values to exclude from display (see also next param).

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

Assoc. array of field name => values to exclusively show in display (see also previous param).

Return values
HideFacetValueListener

getMockSearchCommand()

Get a mock search command.

protected getMockSearchCommand([ParamBag $params = null ][, mixed $context = null ][, string $backendId = 'foo' ][, mixed $result = null ]) : AbstractBase
Parameters
$params : ParamBag = null

Parameters for command to return

$context : mixed = null

Context for command to return

$backendId : string = 'foo'

Backend ID for command

$result : mixed = null

Result to return

Return values
AbstractBase

Search results