VuFind API Documentation

BackendTest extends TestCase
in package
Uses FixtureTrait

Unit tests for BrowZine backend.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link
https://vufind.org

Table of Contents

testConstructorSetters()  : void
Test setting a custom record collection factory.
testDefaultQueryBuilder()  : void
Test generation of a default query builder.
testDefaultRecordCollectionFactory()  : void
Test construction of default record collection factory.
testRetrieve()  : void
Test retrieving a record (not supported).
testSearch()  : void
Test performing a search.
testSetQueryBuilder()  : void
Test setting a query builder.
getConnector()  : Connector
Return connector.
getConnectorMock()  : array<string|int, mixed>
Return connector mock.
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).
getRCFactory()  : RecordCollectionFactory
Build a real record collection factory

Methods

testConstructorSetters()

Test setting a custom record collection factory.

public testConstructorSetters() : void
Return values
void

testDefaultQueryBuilder()

Test generation of a default query builder.

public testDefaultQueryBuilder() : void
Return values
void

testDefaultRecordCollectionFactory()

Test construction of default record collection factory.

public testDefaultRecordCollectionFactory() : void
Return values
void

testRetrieve()

Test retrieving a record (not supported).

public testRetrieve() : void
Return values
void

testSearch()

Test performing a search.

public testSearch() : void
Return values
void

testSetQueryBuilder()

Test setting a query builder.

public testSetQueryBuilder() : void
Return values
void

getConnector()

Return connector.

protected getConnector([string $fixture = null ]) : Connector
Parameters
$fixture : string = null

HTTP response fixture to load (optional)

Return values
Connector

getConnectorMock()

Return connector mock.

protected getConnectorMock([array<string|int, mixed> $mock = [] ]) : array<string|int, mixed>
Parameters
$mock : array<string|int, mixed> = []

Functions to mock

Return values
array<string|int, mixed>

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