EuropeanaResultsTest
extends TestCase
in package
Uses
FixtureTrait
EuropeanaResults tests.
Tags
Table of Contents
- testResponseParsing() : void
- Test that the module properly parses a sample response.
- getFixture() : string
- Load a fixture file.
- getFixtureDir() : string
- Get the base directory containing fixtures.
- getFixturePath() : string
- Resolve fixture path.
- getHttpService() : HttpClient
- Return connector.
- getJsonFixture() : array<string|int, mixed>
- Load a JSON fixture from file (using associative array return type).
- getMockParams() : Params
- Get a mock params object.
- getMockResults() : Results
- Get a mock results object.
Methods
testResponseParsing()
Test that the module properly parses a sample response.
public
testResponseParsing() : void
This is a bare minimum test to confirm that Laminas\Feed deals with the RSS response correctly. More work should be done to confirm that URL generation works appropriately, optional configuration parameters are respected, etc.
Return values
void —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 —getHttpService()
Return connector.
protected
getHttpService([string $fixture = 'europeana' ]) : HttpClient
Parameters
- $fixture : string = 'europeana'
-
HTTP response fixture to load (optional)
Return values
HttpClient —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> —getMockParams()
Get a mock params object.
protected
getMockParams([Query $query = null ]) : Params
Parameters
- $query : Query = null
-
Query to include in container.
Return values
Params —getMockResults()
Get a mock results object.
protected
getMockResults([Params $params = null ]) : Results
Parameters
- $params : Params = null
-
Params to include in container.