ConnectorTest
extends TestCase
in package
Uses
FixtureTrait
Unit tests for EDS connector.
Tags
Table of Contents
- $response : string
- Current response.
- testCaching() : void
- Test caching.
- createClient() : Client
- Set up HTTP client using test adapter with prepared response.
- createConnector() : Connector
- Create connector with fixture file.
- 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
$response
Current response.
protected
string
$response
Methods
testCaching()
Test caching.
public
testCaching() : void
Return values
void —createClient()
Set up HTTP client using test adapter with prepared response.
protected
createClient() : Client
Return values
Client —createConnector()
Create connector with fixture file.
protected
createConnector([string $fixture = null ][, Client $client = null ]) : Connector
Parameters
- $fixture : string = null
-
Fixture file
- $client : Client = null
-
HTTP client
Tags
Return values
Connector —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.