VuFind API Documentation

ConnectorTest extends TestCase
in package
Uses FixtureTrait

Unit tests for Primo connector.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link
https://vufind.org

Table of Contents

$response  : string
Current response.
testCaching()  : void
Test caching.
testDifferentlyNamespacedQuery()  : void
Test a query response with non-standard namespacing.
testEmptyQueryError()  : void
Test that an empty query causes an error.
testErrorInSuccessfulResponse()  : void
Test a query response that contains an error message but has a successful HTTP status.
testGetRecord()  : void
Test a healthy call to getRecord.
testInstitutionCode()  : void
Test default timeout value
testQuery()  : void
Test a healthy call to query.
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

Methods

testCaching()

Test caching.

public testCaching() : void
Return values
void

testDifferentlyNamespacedQuery()

Test a query response with non-standard namespacing.

public testDifferentlyNamespacedQuery() : void
Return values
void

testEmptyQueryError()

Test that an empty query causes an error.

public testEmptyQueryError() : void
Return values
void

testErrorInSuccessfulResponse()

Test a query response that contains an error message but has a successful HTTP status.

public testErrorInSuccessfulResponse() : void
Return values
void

testGetRecord()

Test a healthy call to getRecord.

public testGetRecord() : void
Return values
void

testInstitutionCode()

Test default timeout value

public testInstitutionCode() : void
Return values
void

testQuery()

Test a healthy call to query.

public testQuery() : void
Return values
void

createConnector()

Create connector with fixture file.

protected createConnector([string $fixture = null ]) : Connector
Parameters
$fixture : string = null

Fixture file

Tags
throws
InvalidArgumentException

Fixture file does not exist

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
throws
RuntimeException
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
throws
RuntimeException
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>

Search results