VuFind API Documentation

LibGuidesProfileTest extends TestCase
in package
Uses FixtureTrait

LibGuidesProfile recommendation module Test Class

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Maccabee Levine msl321@lehigh.edu

license

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

link

Wiki

Table of Contents

$cacheAdapter  : StorageInterface
Cache adapter object
$connector  : LibGuides
LibGuides connection object
$libGuidesProfile  : LibGuidesProfile
LibGuidesProfile object
setUp()  : void
Set up mocks for tests.
testCallNumberMatch()  : void
Test call number match
testSubjectExactMatch()  : void
Test search term that is an exact match for a subject specialty
testSubjectLooseMatch()  : void
Test search term that is a loose match for a subject specialty
testSubjectSubstring()  : void
Test search term that is a substring of a subject specialty
buildProfile()  : LibGuidesProfile
Build a partially mocked LibGuidesProfile object
buildQueryResults()  : Results
Build a partially mocked Results object for a given query string
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).

Properties

Methods

testCallNumberMatch()

Test call number match

public testCallNumberMatch() : void
Return values
void

testSubjectExactMatch()

Test search term that is an exact match for a subject specialty

public testSubjectExactMatch() : void
Return values
void

testSubjectLooseMatch()

Test search term that is a loose match for a subject specialty

public testSubjectLooseMatch() : void
Return values
void

testSubjectSubstring()

Test search term that is a substring of a subject specialty

public testSubjectSubstring() : void
Return values
void

buildQueryResults()

Build a partially mocked Results object for a given query string

protected buildQueryResults(string $queryString[, array<string|int, mixed> $facets = [] ]) : Results
Parameters
$queryString : string

The query string

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

The result facets

Return values
Results

The Results object

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>

Search results