VoyagerTest
extends ILSDriverTestCase
in package
Uses
FixtureTrait, ReflectionTrait
ILS driver test
Tags
Table of Contents
- $driver : AbstractBase
- ILS driver
- setUp() : void
- Standard setup method.
- testMarcParsing() : void
- Test MARC holdings parsing.
- testMissingConfiguration() : void
- Test that driver complains about missing configuration.
- testUsernameEncodingDuringLogin() : void
- Test that patron usernames are correctly encoded during login.
- callMethod() : mixed
- Call protected or private method for side-effect and result.
- getDriverWithMockSqlResponse() : Voyager
- Get a Voyager driver customized to return a mock SQL response.
- 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).
- getProperty() : mixed
- Return protected or private property.
- setProperty() : void
- Set protected or private property.
Properties
$driver
ILS driver
protected
AbstractBase
$driver
Methods
setUp()
Standard setup method.
public
setUp() : void
Return values
void —testMarcParsing()
Test MARC holdings parsing.
public
testMarcParsing() : void
Return values
void —testMissingConfiguration()
Test that driver complains about missing configuration.
public
testMissingConfiguration() : void
Return values
void —testUsernameEncodingDuringLogin()
Test that patron usernames are correctly encoded during login.
public
testUsernameEncodingDuringLogin() : void
Return values
void —callMethod()
Call protected or private method for side-effect and result.
protected
callMethod(object|string $object, string $method[, array<string|int, mixed> $arguments = [] ]) : mixed
Uses PHP's reflection API in order to modify method accessibility.
Parameters
- $object : object|string
-
Object or class name
- $method : string
-
Method name
- $arguments : array<string|int, mixed> = []
-
Method arguments
Tags
Return values
mixed —getDriverWithMockSqlResponse()
Get a Voyager driver customized to return a mock SQL response.
protected
getDriverWithMockSqlResponse(MockObject|PDOStatement $mockResult) : Voyager
Parameters
- $mockResult : MockObject|PDOStatement
-
Mock result to return from executeSQL
Return values
Voyager —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> —getProperty()
Return protected or private property.
protected
getProperty(object|string $object, string $property) : mixed
Uses PHP's reflection API in order to modify property accessibility.
Parameters
- $object : object|string
-
Object or class name
- $property : string
-
Property name
Tags
Return values
mixed —setProperty()
Set protected or private property.
protected
setProperty(object|string $object, string $property, mixed $value) : void
Uses PHP's reflection API in order to modify property accessibility.
Parameters
- $object : object|string
-
Object or class name
- $property : string
-
Property name
- $value : mixed
-
Property value