LibGuidesTest
extends TestCase
in package
Uses
FixtureTrait
Unit tests for Wikipedia connector.
Tags
Table of Contents
- testGetAccounts() : void
- Test loading accounts.
- getClient() : Client
- Load HTTP client w/ fixture
- getConfig() : Config
- Create a fake LibGuidesAPI.ini config.
- 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).
Methods
testGetAccounts()
Test loading accounts.
public
testGetAccounts() : void
Return values
void —getClient()
Load HTTP client w/ fixture
protected
getClient(string $fixture) : Client
Parameters
- $fixture : string
-
Fixture name
Return values
Client —getConfig()
Create a fake LibGuidesAPI.ini config.
protected
getConfig() : Config
Return values
Config —The fake config
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.