VuFind API Documentation

TermsIdFetcherTest extends TestCase
in package
Uses WithConsecutiveTrait

GetIdsWithTermsCommand 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

$countPerPage  : int
Page size to use in tests
$uniqueKey  : string
Unique key field to use in tests
testFetching()  : void
Test the terms retrieval process.
testFilters()  : void
Test that filters are unsupported.
expectConsecutiveCalls()  : InvocationStubber
Expect consecutive calls to a mock.
getIdsExpectation()  : callable
Get a function to test that a TermsCommand is as expected.
getMockKeyCommand()  : GetUniqueKeyCommand
Get a mock "GetUniqueKeyCommand" for testing purposes.
getMockService()  : Service
Get mock search service
getMockTermsCommand()  : TermsCommand
Get a mock "TermsCommand" to use as a container for a test value.
getTermsResponse()  : Terms
Get a terms response

Properties

Methods

testFetching()

Test the terms retrieval process.

public testFetching() : void
Return values
void

testFilters()

Test that filters are unsupported.

public testFilters() : void
Return values
void

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

getIdsExpectation()

Get a function to test that a TermsCommand is as expected.

protected getIdsExpectation(string $expectedCursorMark) : callable
Parameters
$expectedCursorMark : string

Expected cursor mark

Return values
callable

getTermsResponse()

Get a terms response

protected getTermsResponse(array<string|int, int> $expectedIds) : Terms
Parameters
$expectedIds : array<string|int, int>

IDs to return in response

Return values
Terms

Search results