VuFind API Documentation

InjectHighlightingListenerTest extends TestCase
in package
Uses MockSearchCommandTrait, WithConsecutiveTrait

Unit tests for inject highlighting 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

$backend  : BackendInterface
Backend.
$listener  : MultiIndexListener
Prepare listener.
testAttach()  : void
Test attaching listener.
testParameters()  : void
Test that appropriate parameters are sent to connector.
expectConsecutiveCalls()  : InvocationStubber
Expect consecutive calls to a mock.
getMockSearchCommand()  : AbstractBase
Get a mock search command.
setUp()  : void
Setup.

Properties

Methods

expectConsecutiveCalls()

Expect consecutive calls to a mock.

protected expectConsecutiveCalls(MockObject $mock, string $method, array<string|int, mixed> $expectedCalls[, mixed $returnValues = null ]) : InvocationStubber
Parameters
$mock : MockObject

Mock object

$method : string

Method expecting calls

$expectedCalls : array<string|int, mixed>

Expected input parameters

$returnValues : mixed = null

Return values to mock (either an array indexed parallel to $expectedCalls to return different values, or a single value to always return the same thing)

Return values
InvocationStubber

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