BackendTest
extends TestCase
in package
Uses
FixtureTrait
Unit tests for EIT backend.
Tags
Table of Contents
- testConstructorSetters() : void
- Test setting a custom record collection factory.
- testDefaultQueryBuilder() : void
- Test generation of a default query builder.
- testRetrieve() : void
- Test retrieving a record.
- testSearch() : void
- Test performing a search.
- testSetQueryBuilder() : void
- Test setting a query builder.
- 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
- loadResponse() : mixed
- Load a response as fixture.
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 —testRetrieve()
Test retrieving a record.
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 —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
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
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> —getRCFactory()
Build a real record collection factory
protected
getRCFactory() : RecordCollectionFactory
Return values
RecordCollectionFactory —loadResponse()
Load a response as fixture.
protected
loadResponse(string $fixture) : mixed
Parameters
- $fixture : string
-
Fixture file